dataItem

Returns the data item corresponding to the passed row object or selector.

Parameters

row String|Element|jQuery

A string, DOM element or jQuery object which represents the ListView item. A string is treated as a jQuery selector.

Returns

kendo.data.ObservableObject The data item to which the specified ListView item is bound. More information about the ObservableObject type in kendo.data.ObservableObject.

Example - get the data item to which the first ListView item is bound

<div id ="listView"></div>
<div id="result"></div>

<script>
  var dataSource = new kendo.data.DataSource({
    data: [ { name: "Jane Doe", age: 25 }, { name: "John Doe", age: 56 }]
  });
  var listview = $("#listView").kendoListView({
    dataSource: dataSource,
    template: "<div>#:name#</div>"
  }).data("kendoListView");

  var row = $('#listView .k-listview-item').first();

  var dataItem = listview.dataItem(row);
  $("#result").html("Result: " + dataItem.name + " - " + dataItem.age);
</script>
In this article