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.
Unfortunately, activation email could not send to your email. Please try again.

Disable edit when using MVVM binding

Thread ID:

Created:

Updated:

Platform:

Replies:

119170 May 18,2015 04:46 AM May 19,2015 01:21 AM WPF 1
loading
Tags: TreeViewAdv
Gaetan Vanderhaegen
Asked On May 18, 2015 04:46 AM

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 01:21 AM

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.

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.

;