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 

SelectedItems.Count > 0 when DataSource = NULL

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
Andrew Rowley



Joined: 24 Dec 2005
Posts: 63

PostPosted: Mon May 21, 2007 4:50 am    Post subject: SelectedItems.Count > 0 when DataSource = NULL Reply with quote

At one point in my code I clear the data from the tree by setting the DataSource to NULL.

At another point, I check whether the user has selected any items in the tree by checking for SelectedItems->Count > 0. I find that SelectedItems->Count = 1, after I set the DataSource to NULL. If I look at the SelectedItems property in the debugger, Count is 1 but all values in SelectedItems are <undefined value>. SelectedRows.Count is also 1.

Is there some other method I should be using to clear the tree, or to check whether any rows are selected?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue May 22, 2007 7:43 am    Post subject: Reply with quote

This sounds similar to the earlier problem you reported:

http://www.infralution.com/phpBB2/viewtopic.php?t=874

which was fixed in 3.4.0. Are you using 3.4.0 now?
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Andrew Rowley



Joined: 24 Dec 2005
Posts: 63

PostPosted: Wed May 23, 2007 2:04 am    Post subject: Reply with quote

You're right, it does - I had forgotten about that one.

I am using version 2.7.0 - I am still on VS2003, and can't really upgrade at this point.

I ended up working around the previous problem by adding an extra check in the code.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
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