javascriptkendo-uikendo-treelist

How to programatically select a node in a treeList (Kendo)


Is there a way to select a node in a treeList by default ?

How can I select a node in a treeList programmatically ?

Is there a method similar to findByUid as in a treeView ?


Solution

  • Sure, there is a method called select():

    var tr = $("#treelist .k-grid-content tr:first"); // The row
    $("#treelist").data("kendoTreeList").select(tr);
    

    The method accepts only a tr element.

    Demo.