Disable Selection of Child Items on TreeView

2 posts, 0 answers
  1. RAV44
    RAV44 avatar
    4 posts
    Member since:
    Jul 2013

    Posted 31 Oct 2014 Link to this post

    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
  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 03 Nov 2014 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
Back to Top