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

Treeview Disabled Node - Checkbox Still Enabled

1 Answer 275 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Colin M
Top achievements
Rank 1
Colin M asked on 08 Mar 2013, 08:16 AM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 11 Mar 2013, 01:55 PM
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!
Tags
TreeView
Asked by
Colin M
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or