View previous topic :: View next topic |
Author |
Message |
Andrew Rowley
Joined: 24 Dec 2005 Posts: 63
|
Posted: Wed Feb 14, 2007 7:09 am Post subject: Failed to load resources from resource file |
|
|
I have another problem which may or may not be related to my previous problem.
I have set up the virtual tree and can see the data. I can expand and collapse rows OK using the mouse.
I have some rows that when they are expanded, I also want to expand the children. I set up an event for the RowExpand, and in it I check the type and do:
e->Row->ExpandChildren(false);
I get the error:
Setup Error
Failed to load resources from resource file
Please check your Setup
Can you suggest what might cause this problem?
Thanks
Andrew Rowley |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Feb 14, 2007 9:16 pm Post subject: |
|
|
This does not look like an error that would be originating from Virtual Tree. Because calling ExpandRow will ultimately call back into your application code to retrieve data for the expanded rows the error may be originating in your code.
Have you got some more information (like a stack trace and the exception name)? Are you catching this as an exception in the debugger or running the application standalone? _________________ Infralution Support |
|
Back to top |
|
|
Andrew Rowley
Joined: 24 Dec 2005 Posts: 63
|
Posted: Thu Feb 15, 2007 11:07 pm Post subject: |
|
|
It turns out that this is a stack overflow exception. If I run it under the debugger, I see the exception. For some reason I don't get it when running it normally.
It seems that calling ExpandChildren from the RowExpand event is not a good idea. I think that when I call ExpandChildren, the RowExpand event fires again for the current row. Is there any way to get around this?
I have been through my tree and expanded every child row manually, so I know that I haven't got an endless tree or anything like that. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Feb 16, 2007 12:01 am Post subject: |
|
|
What exactly are you trying to achieve? If you want the children of a node to expand when it is displayed you may want to investigate using the ChildPolicy.AutoExpand option - which you can set in the RowBindings or by handling the GetChildPolicy event _________________ Infralution Support |
|
Back to top |
|
|
Andrew Rowley
Joined: 24 Dec 2005 Posts: 63
|
Posted: Fri Feb 16, 2007 12:22 am Post subject: |
|
|
Thanks, that option does indeed do what I was trying to do. I just hadn't found it. |
|
Back to top |
|
|
|