After reading other various forum articles and documentation it looks like selecting the parent node (or any other node) is possible when the tree is initialised. However, with the following code the first node is not selected. It's a pretty simple bit of code, so would appreciate any help.
Thanks,
Ross
Thanks,
Ross
@(Html.Kendo().TreeView().Name("treeview")
.AutoBind(true)
.LoadOnDemand(true)
.DataTextField("Name")
.DataSource(dataSource => dataSource
.Read(read => read
.Action("GetNameList", "Home"))
.Events(e => e.RequestEnd("onRequestEnd"))
)
)
<
script
>
var treeview;
$(document).ready(function () {
treeview = $("#treeview").data("kendoTreeView");
});
function onRequestEnd() {
treeview.select(".k-first");
}
</
script
>