We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Stopping TreeViewAdv nodes changing

Thread ID:





89314 Aug 21,2009 03:22 PM UTC Aug 24,2009 01:29 PM UTC WPF 1
Tags: Tools
Anton De Gruchy
Asked On August 21, 2009 03:22 PM UTC

I need to prevent a user from selecting a node based on some validation. In the WinForms version of the TreeViewAdv I can use BeforeSelect and pass args.Cancel = true. How do I achieve the same thing with the WPF tree?

C. Sudha [Syncfusion]
Replied On August 24, 2009 01:29 PM UTC


Currently, we didnt have that feature in TreeViewAdv control. However, Your requirments will be acheived by workaround.

For instance, In selected event, you write the following code snippet,


private void item1_Selected(object sender, RoutedEventArgs e)
if (!item1selected )
item1selected = true;
(sender as TreeViewItemAdv).IsSelected = false;

Please download the attached sample for more reference.

Please let us know if you have any questions.

Thanks for choosing Syncfusion products.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon