treeViewAdv

hi

How can i prevent a selection node for the nodes who are enable = false.
thanks

1 Reply

BA Balavasanth Syncfusion Team August 24, 2009 04:19 AM UTC

Hi Samuel,

Thanks for your interests in Syncfusion products.

You can make use of the BeforeSelect event to prevent a node from being selected when setting enabled as False. Kindly make
use of the code snippet for how to set the args value as canceled one.

void treeViewAdv1_BeforeSelect(object sender, Syncfusion.Windows.Forms.Tools.TreeViewAdvCancelableSelectionEventArgs args)
{
if (args.SelectedNodes[0].Enabled == false)
{
args.Cancel = true;
}
}

We are also sending you a simple sample as per your requirement. Kindly download it from the below location.

http://files.syncfusion.com/support/Tools.Windows/7.3.0.20/F89306/main.htm

Please let us know if you have any queries.

Regards,
Bala.

Loader.
Up arrow icon