Hi,
I have a requirement in which I need to enable user to select multiple nodes using ctrl key on the tree based on a criteria (node type). Overriding the SelectionType = Extended and SelectionBeavior = ExtendedAcrossCollections would enable me to select nodes of any type.
If my tree is modelled like below, I want to enable Ctrl+Selection only on nodes B1, B2, B3 and D1, D2, D3. Anywhere else the Ctrl+selection should function as select single node. Let me know if this behavior can be achieved?
A (root)
B(child)
B1, B2, B3 (children of B)
C (Child)
C1, C2, C3
D (Child)
D1, D2, D3
Hello,
You could manage the appearance of particular node trough NodeAppearance object. You could use code like:
UltraTreeNode node = ultraTree1.GetNodeByKey("Your Node key");
node.Override.NodeAppearance.BackColor = Color.Red;
On the following link you will find more information about NodeAppearance and sample tutorial how to do this.
http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.2/CLR4.0/html/Infragistics4.Win.UltraWinTree.v12.2~Infragistics.Win.UltraWinTree.Override~NodeAppearance.html
Please let me know if you have any further questions.
In ultrawintree how can we highlight and node with some color programmatically.
Hristo,
Awesome, am looking for this functionality. Thanks for quick resposne.
Thanks,
Chandrakant.
If you want to have cross node selection, then you should set SelectionBehavior property of UltraTree to ExtendAcrossCollection. The you could handle BeforeSelect Event of UltraTree, in order to disallow multi- selection of the specific nodes. I have modify my sample in order to demonstrate you this approach. Please feel free to modify my sample based on your needs.
I hope that this will helps you.
Mike,
Do you mean to enable SelectionType = Extended on the whole tree and then in the BeforeSelect event of the node I check my condition and cancel if it is not the node of my preference.
It sounds good. Will give a try tomorrow A.M and let you know.
Thanks for your quick response.