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

Disable Selection of Child Items on TreeView

1 Answer 381 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
RAV44
Top achievements
Rank 2
RAV44 asked on 31 Oct 2014, 04:25 PM
Hi,

I'm using a Treeview component with checkboxes but I'm using it more like a list of items, instead of a tree. What I want to do is to disable the selection of the items. I've tried this solution but it still shows an item selection:

.k-treeview .k-in.k-state-hover,
.k-treeview .k-in.k-state-focused,
.k-treeview .k-in.k-state-selected {
    border-color:transparent;
    background-color:transparent;
}

Could I set the items as unselectable or something similar? O do I have to make a Css hack ?

Thanks,
Raul

1 Answer, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 03 Nov 2014, 09:13 AM
Hello Raul,

To prevent selection of items, call e.preventDefault() in the select event handler.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TreeView
Asked by
RAV44
Top achievements
Rank 2
Answers by
Alex Gyoshev
Telerik team
Share this question
or