How to programmatically select the root node of Kendo UI treeview -


I am a Candido UI novice My ASP.net mvc application has a Candido UI preview that has the following type of installation. Each tree node has a unique ID (for example an employee who is an integer). Can I programmatically select the root node of the cando UI stream (which has an ID of 1) and the background color of the root node should be highlighted? Thanks for your help

  on _root = new kendo.data.HierarchicalDataSource ({transport:. {Read: {cache: false, url: "/ employee / GetEmployees", datatype: "json ", data: {EmployeeID: _selectedId}}}, schema: {model: {id:" Id ", HasChildren:" HasChildren ", expanded:" expand ", parentId:" parentId ", itemtype:" itemtype "}} }); _tree = $ ( "# TreeView") kendoTreeView (the {Data source: _root, dataTextField: "Name", loadOnDemand: True, dataImageUrlField: "image", databound :. function (e) {HandleTreeDataBound (e);}; Select: Function (e) {handle select (e.node);}}}; TreeViewCtrl = $ ("# treeView"). Data ("kendoTreeView");  

Using the method of treeview, how do you choose the first node:

  treeViewCtrl.select ($ ("# TreeView") (looks) first (). "K-item."););  

If you have more than one root node, you will have to use the method to get the data items and compare your ID with the one you want to select.


Comments