Hi Narry,
Thank you for using Syncfusion Product,
We would like to let you know that your requirement of removing Unchecked nodes and Childnodes in TreeViewAdv can be achieved by adding the below code snippet. Please refer this and attached sample regarding TreeViewAdv.
Code Snippet[C#]:
void RemoveCheckedNodes(TreeNodeAdvCollection nodes)
{
List<TreeNodeAdv> checkedNodes = new List<TreeNodeAdv>();
foreach (TreeNodeAdv node in nodes)
{
if (!node.Checked)
{
checkedNodes.Add(node);
}
else
{
RemoveCheckedNodes(nodes[0].Nodes);
}
}
foreach (TreeNodeAdv checkedNode in checkedNodes)
{
nodes.Remove(checkedNode);
}
}
private void button1_Click(object sender, EventArgs e)
{
RemoveCheckedNodes(treeViewAdv1.Nodes);
}
Please let us know if you need any further assistance,
Regards,
T.Saravanan
Attachment:
WindowsFormsApplication263_(2)_6c18eb31.zip