1

I have ultrawintree control in my application. Now i want to make checked all the child node of selected treenode in tree.

I am new in windows application. So please help to find out the solution for the same.

So can anyone tell me how to do it?

Brijesh Patel
  • 2,901
  • 15
  • 50
  • 73

2 Answers2

2

Assuming that you are adding the check boxes to the nodes by setting the NodeStyle to Checkbox you could handle the AfterCheck event and update the children in this event:

void ultraTree1_AfterCheck(object sender, NodeEventArgs e)
{
    foreach (UltraTreeNode node in e.TreeNode.Nodes)
        node.CheckedState = e.TreeNode.CheckedState;
}
alhalama
  • 3,218
  • 1
  • 15
  • 21
0

You have to use the Property SelctionType as Extended to Allow Multiple Selection.

Me.UltraTree1.Override.SelectionType =
    Infragistics.Win.UltraWinTree.SelectType.Extended

Create Method Iterate the Each node under Checked Nodes, and Selected = true

node Varible is the node which you Checkecd , you will get the Node form EventArgs

  foreach(UltraTreeNode child in node.Nodes)

    node.Selected = true;
Akshay Joy
  • 1,765
  • 1
  • 14
  • 23
  • Selection isn't related to the checked state of the nodes if they are created by setting the NodeStyle to Checkbox. – alhalama Jun 01 '13 at 01:14