Hi,
I need urgent help.
I have WinTree with Style -OutlookExpress and SelectionBehaviour - ExtendedAcrossCollections. It is possible to select multiple rows by mouse drag.
Please guide me in the following problems.
1) I can't select distant rows with Ctrl + Click
2) On Shift + Click, first row is not selected.
3)
a) I want to select all child nodes of a node when the node is being selected. How can I do it?
b) How can the selection be retained even though the node is collapsed and then expand.
TIA,
Sheeba
hi,
FYI: I am using Infragistics WinForms 2008 Vol 1 CLR 2.0
I read the SelectionBehavior tutorial. Yes, it is documented well, but do not mention about the dependency to CellClickAction property .
I understand that CellClickAction should be SelectNodeOnly/Default inorder to work selection behavior well . Am I right? But I want the ActiveCell should not be null. So I did one work around to set the ActiveCell of the Tree. i.e. on MouseClick event set the current cell as ActiveCell. It worked fine. Will it work all the time? Any loop holes? pls advice.
AfterExpand event handling did not serve my purpose. I wish the previously selected nodes remain selected all the time. No new selection should not happen on expand.
Please help
TIA
sheeba_y said:But I want to set this property also. Because I have to do some operations with the active cell. Please help.
sheeba_y said:How to restrict the child nodes from selecting when the node is being expanded.
Thank you very much for your reply.
1 & 2 ) I found that the problems 1 & 2 are caused by the property treeControl.Override.CellClickAction = CellClickAction.ActivateCell. When I comment this line, Ctrl+Click and Shift + Click work exactly.
But I want to set this property also. Because I have to do some operations with the active cell. Please help.
3) Handled AfterSelect event and it worked. But one problem, the child nodes are selected when the node is expanded. How to restrict the child nodes from selecting when the node is being expanded. Please advice.
1. By default, you cannot select nodes that belong to different nodes collections. I assume this is what you mean by "I can't select distant rows". You can use the control's SelectionBehavior property to allow selection across different node collections.
2. I was not able to reproduce this behavior with the latest version.
3) (a) To select child nodes when a parent is selected, you can handle the AfterSelect event and select the child nodes therein. (b) A node's selected state is not changed when its expanded state changes, so I'm not sure what you mean by this.