Edit this page

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>
<script>
  var dataSource = new kendo.data.DataSource({
    data: [ { name: "Jane Doe" }, { name: "John Doe" }]
  });
  var listview = $("#listView").kendoListView({
    dataSource: dataSource,
    template: "<div>#:name#</div>"
  }).data("kendoListView")

  var row = $('#listView > div').first();
  console.log(listview.dataItem(row));
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy