1

Is there a way we could check whether all the nodes in a particular Level of a Telerik RadTreeControl are Selected using C# code(preferably LINQ)

I am using the the below code to get the Value for the Checked nodes in Level 1

selectedValues = string.Join(",", radTree.CheckedNodes.Where(node => node.Level == 1).Select(node => node.Value).ToArray());

Thanks in advance!

Denzil Soans
  • 667
  • 1
  • 7
  • 27

1 Answers1

1

Try looping through the nodes, checking their level and what their Checked property returns:

    List<RadTreeNode> lvlOneNodes = RadTreeView1.GetAllNodes().Where(node => node.Level == 1).ToList();
    foreach (RadTreeNode item in lvlOneNodes)
    {
        Response.Write(item.Checked);
    }
rdmptn
  • 5,413
  • 1
  • 16
  • 29