itemFor

(Available as of the 2015.3.930 release) Returns the rendered HTML element for a given model.

Parameters

model kendo.data.TreeListModel|Object

A model from the DataSource, or the id of a model in the DataSource.

Returns

jQuery - The row that corresponds to the model.

Example - getting the row from model

<button id="itemFor">Highlight the row with Jane</button>
<div id="treeList"></div>
<script>
  $("#treeList").kendoTreeList({
    columns: [
      { field: "id" },
      { field: "name" },
      { field: "age" }
    ],
    dataSource: [
      { id: 1, parentId: null, name: "Jane Doe", age: 22, expanded: true },
      { id: 2, parentId: 1, name: "John Doe", age: 24 },
      { id: 3, parentId: 1, name: "Jenny Doe", age: 3 }
    ],
    selectable: true
  });
  $("#itemFor").click(function(){
    var treeList = $("#treeList").data("kendoTreeList");
    var jane = treeList.dataSource.get(1);
    var row = treeList.itemFor(jane);

    treeList.select(row);
  });
</script>
In this article