This is a migrated thread and some comments may be shown as answers.

RadTreeView: disable checkboxes

1 Answer 107 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Adrian Rotaru
Top achievements
Rank 1
Adrian Rotaru asked on 02 Aug 2013, 03:33 PM
Hello

For certain items in a RadTreeView I need to disable the associated checkbox. I need to display it but I don't want the user to be able to change its state. The rest of the functionality is needed: if a child node is selected I need the parent node to reflect this even if its checkbox is disabled. Also the collapse/expand functionality is needed and so on...
In WinForms version I learned that there is an event named NodeFormatting that might help but Silverlight seems to miss this one.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 07 Aug 2013, 12:33 PM
Hi Adrian,

In order to achieve your requirement you can implement an MVVM approach in your application. Furthermore, you will be able to define a HierarchicalDataTemplate with a CheckBox inside and bind its IsChecked property to property defined in your ViewModel. Also, in order to disable it, you can set its IsEnabled property to False.

You can refer to this article where we used similar HierarchicalDataTemplate and custom check/uncheck logic. Please give this approach a try and let us know if you need any further assistance.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
TreeView
Asked by
Adrian Rotaru
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or