Page 1 of 1

Datagrid's error

Posted: Thu Jul 23, 2009 4:05 pm
by giovannic
Hi all.
I'm using a simple table dataGrid in a stack o mine and I often get an error with a messagebox in which I can read:

An error has occurred in behavior for the column template:
Chunk: no such object

In this box I can see two btns: "Edit Script" and "OK".
If I choose "Edit Script" a script Window is open at line 3410 of "_table.DrawColumns" handler in the dataGrid's library.
At that line I can read

if pIndexesToDraw is not empty then etc.
I get this error a lot of times but I can't reproduce it.
At same conditions sometimes I've, but not always...
What's the matter?
Thank u for all and bye

How to reset the dataGrid?

Posted: Thu Jul 23, 2009 5:15 pm
by giovannic
Hi.
After 2 hours of tries XD I think that my problem is
related to one of the dgProp i use during my elaboration...
So my question is:
there is a way to reset the dataGrid's custom property set
properties to their default values before I re-modify'em?

Re: How to reset the dataGrid?

Posted: Tue Jul 28, 2009 2:05 pm
by shadowslash
giovannic wrote:Hi.
After 2 hours of tries XD I think that my problem is
related to one of the dgProp i use during my elaboration...
So my question is:
there is a way to reset the dataGrid's custom property set
properties to their default values before I re-modify'em?
A possible way would be to put the old properties in a variable or into another set of properties then restore them later.

Re: How to reset the dataGrid?

Posted: Fri Jul 31, 2009 11:35 am
by giovannic
shadowslash wrote: A possible way would be to put the old properties in a variable or into another set of properties then restore them later.
Hi! First of all TY for ur reply and excuse my delay!!!
Yes, it's a good solution to backup the original setting to reset'em before my changes.
But my problem's still there, even if in a lower frequency.
I've had a similar problem trying to populate a dataGrid in a not open stack
but, in this case, the stack and card in where my dataGrid is is opened.

See u

Posted: Fri Jul 31, 2009 8:19 pm
by trevordevore
You mention that you changed some of the dgProps. If you could provide some more information on the changes you've made to the default data grid it would help troubleshoot the issue.

Have you customized the column behaviors at all? If you have then based on your description it may be that your FillInData or LayoutControl handlers reference objects that do not exist, hence the "no such object" error.

dataGrid issue

Posted: Fri Jul 31, 2009 9:54 pm
by giovannic
Here are the dgProp properties I use to modify in my script:

dgProp["row template"]
dgProp["columns"]
dgProp["show header"]
dgProp["sort by column"]

As u can see I don't re-touch too much properties in my
script and the error appear (apparently) in random cases!
Before u say something about my use of dgProp["row template"]
(LOL) I can say that I use this property because I've included the
template group in a card of the same stack in which my dataGrid
is so I can port my stack in a simply way in any of my application.
By the way the dataGrid error was there even before I made
this little "hack"!!! LOL
I hope I can find a situation in which I can reproduce the error.
I know that in this way it's impossible to find the issue!
TY for your reply and help.

Posted: Fri Jul 31, 2009 9:57 pm
by trevordevore
You aren't modifying many properties by you are modifying the row template which could very well be the cause. Have you looked over the column behaviors in the group that you are assigning to the "row template" property to make sure they don't reference any objects that don't exist?

Posted: Sun Aug 02, 2009 7:10 am
by giovannic
As I said in the post above:
the dataGrid error was there even before I made this little "hack"!!!
Anyway the row template property refeer to an existing object (a button I've copy/pasted onto the same card all objects I've found in the card of the datagrid template stack, then I've updated the ID of the button containing the column behavior). And I don't use the column behavior. It's a reeeeeaallly simple table dataGrid!
As always... thank u for ur interest and support! Bye

Posted: Sun Aug 02, 2009 2:32 pm
by trevordevore
What are you setting the column names to? Are you using integers for names by chance?

mmmhhh...

Posted: Sun Aug 02, 2009 6:13 pm
by giovannic
OK. And here I am!
Ur post make me think and I've made some tries.
Using integers name for the columns causes an error similar to
that I've posted but not equal. This message says:

Code: Select all

An error has occurred in behavior for the column template:
Chunk: can't find background
but if I click on "Edit Script" button nothing happens.
So thank u for this warning (I'll never use integers for column names)
but "my" error is different... sorry...
Thank u again

Posted: Mon Aug 03, 2009 2:54 pm
by trevordevore
Hmm, I'm going to need more info to troubleshoot this then. Do you have a simple stack that demonstrates the problem that you could upload?

dgError

Posted: Wed Aug 05, 2009 7:31 am
by giovannic
trevordevore wrote:Hmm, I'm going to need more info to troubleshoot this then. Do you have a simple stack that demonstrates the problem that you could upload?
If u're talkin about the first post of this thread sorry, but as I sayd I've the problem in apparently random cases. It's surely related to the "quality" of data I try to put into the dataGrid but I've not understand what are the problematic data yet.

Let me know if u need more help from me.

Posted: Wed Aug 05, 2009 12:26 pm
by trevordevore
Well there isn't much to go on right now since you don't have arepeatable case and I can't see your code. If you come up with a recipe let me know.

OK...

Posted: Wed Aug 05, 2009 6:20 pm
by giovannic
... of course, I'll do it.
Unfortunately I'me going mad to find a problematic case!
Thank u very much!