Hi Chris,
In AfterCheck event, you could know whether there are more than one node selected, when a particular node is selected using the following code snippet.
private void treeViewAdv1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
// get the point where the mouse was left clicked
Point p = this.treeViewAdv1.PointToClient(Control.MousePosition);
// get the node at the left click point
TreeNodeAdv node = this.treeViewAdv1.PointToNode(p);
if (node != null)
{
// see if the label was clicked on
if (node.TextAndImageBounds.Contains(p))
{
node.Checked =!node.Checked;
}
}
}
int i=0;
private void treeViewAdv1_AfterCheck(object sender, Syncfusion.Windows.Forms.Tools.TreeNodeAdvEventArgs e)
{
i++;
TreeNodeAdv node=new TreeNodeAdv();
Console.WriteLine("AfterCheck fired"+i.ToString());
}
//If the selected node is first node it allows to make changes else no changes
private void treeViewAdv1_AfterSelect(object sender, System.EventArgs e)
{
if(this.treeViewAdv1.SelectedNode==this.treeViewAdv1.Nodes[0])
{
MessageBox.Show("Make changes");
}
else
{
MessageBox.Show("No changes");
}
}
Please take a look at the sample and let me know if this helps you.
Thanks for your interest in Syncfsuion products.
Regards,
Deepa.
LabelCheck.zip