I am trying to find a way of finding the previously checked node, so that I can uncheck
it. To do this, I am trying to store the path of the checked node in a variable, and when another node is checked then I can refer back to the previously checked node with the path. The problem is that when you check a node it does not select the node. I have only found a way to refer to the selected node, but not a checked node.
Thanks in advance (;
ADAdministrator Syncfusion Team October 11, 2004 12:49 PM
You could use the TreeViewAdv''s AfterCheck and BeforeCheck events for this purpose as shown below :
// prevCheck denotes the previously checked node
// currentCheck denotes the currently checked node
TreeNodeAdv prevCheck, currentCheck;
private void treeViewAdv1_BeforeCheck(object sender, Syncfusion.Windows.Forms.Tools.TreeNodeAdvBeforeCheckEventArgs e)
prevCheck = currentCheck;
Trace.WriteLine("previous checked node : " + prevCheck.Text);
private void treeViewAdv1_AfterCheck(object sender, Syncfusion.Windows.Forms.Tools.TreeNodeAdvEventArgs e)
currentCheck = e.Node;
Please refer to the complete sample attached that illustrates this, and let me know if it meets your requirements. We appreciate your interest in Syncfusion products.