Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1175
Checkbox parent node with standard children
posted

Is there any way to add a checkbox node and have child nodes under that node without checkboxes? I've tried this code and it didn't work

 UltraTreeNode utnRole = new UltraTreeNode();

 

utnRole.Text = strRole;

 

utnRole.Override.NodeStyle = NodeStyle.CheckBox;

 

UltraTreeNode utnUser = new UltraTreeNode();

 

utnUser.Text = strUserInGroup;

 

utnUser.Override.NodeStyle = NodeStyle.Standard;

 

utnRole.Nodes.Add(utnUser);

 

tn.Nodes.Add(new TreeNode(strUserInGroup));

 

ultraTree1.Nodes.Add(utnRole);

 

 

 

 

 

 

 

 

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Well, one of the lines of code you have here won't compile and doesn't seem to do anything, anwyay. So I had to remove it:

    tn.Nodes.Add(new TreeNode(strUserInGroup));

    Once I do that, though, I get a parent node in the tree with a checkbox and a child node with no checkbox. Is that not what you are getting?

    What version of the tree do you have?

Children
No Data