TreeViewAdv and Click to show new form

Hi,

I would like a control or form to popup when a user clicks on a child node. I can capture the double click event but that also could fire when a user double clicks the parent node. Is there anyway to popup a form or messagebox when you click on a child node?

thanks

1 Reply

JS Jeba S Syncfusion Team July 12, 2007 10:00 AM UTC

Hi John,

You can prevent the doubleclick event for the parent node by checking the level of the node. Please refer this code snippets:

private void treeViewAdv1_DoubleClick(object sender, EventArgs e)
{
TreeNodeAdv node = this.treeViewAdv1.SelectedNode;
//Check the level
if (node.Level >= 2)
{
MessageBox.Show("Pop Up");
}
}


Please refer the sample in the below link which illustrates the above:
http://websamples.syncfusion.com/samples/Tools.Windows/F63928/main.htm

Thank you for using Syncfusion Products.

Kindly let us know if you need any further assistance.

Best Regards,
Jeba.

Loader.
Up arrow icon