Is it possible to expand disabled nodes. I have the following scenario:
- parent 1 (enabled and selectable)
+ child 1.1 (disabled and not selectable)
+ child 1.1.1 (enabled and selectable)
So I need a treeview where i can select different nodes individually. Right now when i disable a node i cannot access any child nodes.
4 Answers, 1 is accepted
A disabled node can be expanded programmatically through the TreeView's expand method. Here's a dojo example, which demonstrates the use of this method by expanding the "Nissan" disabled node.
Regards,
Ivan Danchev
Progress Telerik

Hi Ivan,
thanks for answering my question. But i'm afraid that is not really what i was looking for. I need the ability to expand and collapse disabled nodes by mouse klick in the tree (just like enabled nodes).
This behavior is not available out-of-the-box but here's a dojo example that shows how to achieve it through jQuery and the TreeView's methods.
Regards,
Ivan Danchev
Progress Telerik

Hi Ivan,
that is exactly the behaviour i was looking for! Thank you very much!
Regards
Frank
Sorry to unaccept this Answer. But I'm afraid with the new Kendo UI version your solution does not work anymore! It seems that the expand/collapse arrow is now disabled and the onclick event-handler does not work anymore.
Is there a solution for this problem?
Hi Frank,
the TreeView nodes rendering has changed since 2017 and indeed, the logic for enabling the expansion of disabled items is no longer valid. You can use the below logic with newer versions of Kendo UI:
$(document).ready(function() {
$(".k-treeview .k-treeview-toggle.k-disabled").removeClass("k-disabled");
$(".k-treeview .k-treeview-toggle").click(function(e) {
var treeview = $("#treeview").data("kendoTreeView");
if($(e.currentTarget).find(".k-toggle-icon").hasClass("k-svg-i-caret-alt-right")) {
treeview.expand($(e.currentTarget).parent().parent());
}
else {
treeview.collapse($(e.currentTarget).parent().parent());
}
$(".k-treeview .k-treeview-toggle.k-disabled").removeClass("k-disabled");
})
});
Dojo demo: https://dojo.telerik.com/iNEDACEw
Regards,
Nikolay