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

Disable edit when using MVVM binding

Thread ID:

Created:

Updated:

Platform:

Replies:

119170 May 18,2015 08:46 AM UTC May 19,2015 05:21 AM UTC WPF 1
loading
Tags: TreeViewAdv
Gaetan Vanderhaegen
Asked On May 18, 2015 08:46 AM UTC

Hello,

I'm trying to disable the editing of nodes in the TreeViewAdv, without success. There is no property on the TreeViewAdv or TreeViewAdv ItemTemplates to disable editing. All the examples show that you can disable editing by setting the property of the TreeViewItemAdv, but since I use MVVM, there is no way for me to do that.

Is there any way to disable this property?

Mariappan S [Syncfusion]
Replied On May 19, 2015 05:21 AM UTC

Hi Gaetan,

Thank you for contacting Syncfusion support.

In our TreeViewAdv control we have provided "IsEditable" property for TreeViewItemAdv. While using MVVM pattern on TreeViewAdv we can define this property using ItemContainerStyle. We have disable the edit option for all TreeViewItemAdv in below code by using ItemContainerStyle.

Code snippets:

<syncfusion:TreeViewAdv.ItemContainerStyle>

<Style TargetType="{x:Type syncfusion:TreeViewItemAdv}">

<Setter Property="IsEditable" Value="False"/>

</Style>

</syncfusion:TreeViewAdv.ItemContainerStyle>


We have prepared a sample by using above code snippets. Please download the sample from the below link.

Sample link: TreeViewSample.zip


Please let us know if you need further assistance.

Regards,
Mariappan S.


CONFIRMATION

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.

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

;