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

disabled Checkbox required for some of the treeview items

1 Answer 72 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Balaji
Top achievements
Rank 1
Balaji asked on 20 Sep 2011, 03:59 PM
Hi,
My Treeview's ItemsOptionListType is set to CheckList and binded it with data. 
My requirement is:-
For some of treeviewitem's checkbox need to be Read only.
I am able to set IsEnable to 'false' in ItemContainerStyle then total item appearance is is disabled mode.
But i want to set IsReadOnly to True which is not available as i want to see same look for all treeview items.

Any Suggestions?


1 Answer, 1 is accepted

Sort by
0
Accepted
Petar Mladenov
Telerik team
answered on 23 Sep 2011, 02:53 PM
Hi Balaji,

 As I managed to understand you want to have CheckBoxes on all of your RadTreeViewItems and some of them should be disabled (for particular items). Since your RadTreeView is bound , you have to create a Custom Style of the RadTreeViewItem (edit the default one and set IsReadOnly to true on the CheckBox element) and the use StyleSelector to set this custom style only to particular items. You may find these article helpful:
Styling the RadTreeViewItem
ItemContainerStyleSelector
Please let us know if you need further assistance or info. 

Greetings,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
TreeView
Asked by
Balaji
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or