Treeview Disabled Node - Checkbox Still Enabled

2 posts, 1 answers
  1. Colin M
    Colin M avatar
    1 posts
    Member since:
    Jul 2012

    Posted 08 Mar 2013 Link to this post

    Hi

    When using the MVC wrappers to bind a treeview to a model I have certain nodes that I don't want to have enabled.  When I set the appropriate property the node is given the correct "k-state-disabled" style. However the associated checkbox with the node remains enabled and is still selectable by the user.

    Is this expected behaviour and if so is there a method that I could use to disable the checkbox.

    Thanks
  2. Answer
    Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 11 Mar 2013 Link to this post

    Hello Colin,

    This is a bug that we just fixed for all upcoming releases. You can either wait for an internal build to be released, request an internal build through a support ticket, or use the following checkbox template:

    checkboxes: {
        template: "<input type='checkbox' #= (item.enabled === false) ? 'disabled' : '' # #= item.checked ? 'checked' : '' #>"
    }

    Here is a jsFiddle of the last option in action.

    All the best,
    Alex Gyoshev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top