Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Collection was modified; enumeration operation may not execu
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Oct 24, 2005 10:14 am    Post subject: Reply with quote

Even if you can't supply the total solution maybe you could provide the form/control code and any code that calls methods on the tree control. We may be able analyse that and see if we can see any problems with what you are are doing and make suggestions.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Oct 26, 2005 12:29 am    Post subject: Reply with quote

The sample project you supplied for the printing problem (http://www.infralution.com/phpBB2/viewtopic.php?t=198) shed some light on this issue. The problem is that you are setting the row.Expanded property from within the GetChildrenForRow method of your derived RowBinding class. This causes problems because it changes the state of the row hierarchy in a recursive/re-entrant fashion. If you want a row to be automatically expanded when it is first displayed you should set the RowChildPolicy to be AutoExpand in the RowBinding. Alternatively you can override the GetRowChildPolicy method of the tree.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
keesp
Guest





PostPosted: Thu Oct 27, 2005 11:37 am    Post subject: continued.... Reply with quote

I have made the adjustment, and although this works fine (so I am no longer expanding the row in the rowbinding, it does not resolve the repaint issue. I Assume, by the way, that you meant to override the GetChildPolicyForRow(Row row) method in stead of GetRowChildPolicy?
I still need to perform an updateRowdata on the rowExpand event in order to ensure that the tree is completely repainted.
I have made a workaround to block this when for instance expanding rows, so that it only occurs once at the end of an expand operation, but I don't feel to happy about this solution (although it works fine)
Back to top
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Oct 27, 2005 12:40 pm    Post subject: Reply with quote

There was a repaint problem in your sample project which was fixed by this change. There may be some further factor in your actual application. If you could send us some of the actual code - even if it won't compile we are happy to see if there is anything else you are doing that may cause this sort of problem.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group