View previous topic :: View next topic |
Author |
Message |
Andrew Rowley
Joined: 24 Dec 2005 Posts: 63
|
Posted: Mon May 21, 2007 4:50 am Post subject: SelectedItems.Count > 0 when DataSource = NULL |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
|
Back to top |
|
|
Andrew Rowley
Joined: 24 Dec 2005 Posts: 63
|
Posted: Wed May 23, 2007 2:04 am Post subject: |
|
|
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 |
|
|
|