View previous topic :: View next topic |
Author |
Message |
keesp Guest
|
Posted: Tue Jun 28, 2005 1:41 pm Post subject: Making rows selectable / non-selectable |
|
|
Hi,
I have a virtual tree that represents a tree consisting of two types of nodes, one of which is basically the leaf of tree that is displayed. Only these should be selected.
Is there any way in which I can prevent the other from being selected (so that clicking them will not have any effect). Preferably I would like to do this when binding the node to the row, but I haven't found anything that seems to support such an option.
Thanks,
Kees |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Jun 29, 2005 1:36 am Post subject: |
|
|
Override the AllowSelectionChange method or handle the SelectionChanging event and cancel the selection change if it includes nodes that should not be selected. If you have AllowMultiSelect set to false this is easy - just check the startRow.Item is a leaf node. If you allow multiple selection then you will need to check that both the StartRow and endRow are leaf nodes and that they belong to the same parent (ie the user isn't attempting a multiple selection that would include the parent. _________________ Infralution Support |
|
Back to top |
|
|
|