Posted 18 Jul 2012 Link to this post
Posted 19 Jul 2012 Link to this post
$("#treeview").kendoTreeView({ dataSource: Categories, expand: onExpand, dataTextField: ["Name", "Name"] }); function onExpand(e) { $("[data-role=treeview]").data("kendoTreeView") .bind("expand", function (e) { this.dataItem(e.node).loaded(false); }) .bind("collapse", function (e) { setTimeout(function () { $(e.node).children(".k-group,.k-animation-container").remove(); }, this.options.animation.collapse.duration); }) }
$("#treeview").kendoTreeView({
dataSource: Categories,
expand: onExpand,
dataTextField: ["Name", "Name"]
});
function onExpand(e) {
$("[data-role=treeview]").data("kendoTreeView")
.bind("expand", function (e) {
this.dataItem(e.node).loaded(false);
})
.bind("collapse", function (e) {
setTimeout(function () {
$(e.node).children(".k-group,.k-animation-container").remove();
}, this.options.animation.collapse.duration);
}