Search code examples
infragisticstreenodeultratree

how to make checked all child node for selected node in ultrawintree in infragistics?


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?


Solution

  • 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;
    }