function viewInit(e) { e.view.element.find("#listView").kendoMobileListView({ dataSource: [ { id: 1, text: "foo" }, { id: 2, text: "bar" } ], template: "id: #: id# with text: #: text#", filterable: [ { ignoreCase: true, field: "text" }, { field: "id" } ] });} $(document).ready(function () {
// Get a reference to the grid
var grid = $("#Grid").data("kendoGrid");
// Select row if specified
if (dataTypeSelectedGuid) {
// This snippet does not work - grid.select() returns no rows
// AND yes, dataTypeSelectedGuid is correct and valid when
// I look at the HTML.
var guidRowMatch = "tr[data-uid=" + dataTypeSelectedGuid + "]";
var row = grid.tbody.find(guidRowMatch);
grid.select(row);
var select = grid.select();
var dataType = grid.dataItem(select);
// This snippet does work - grid.select() returns first row
// as expected. What gives? What's the difference?
var guidRowMatch1 = ">tr:first";
var row1 = grid.tbody.find(guidRowMatch1);
grid.select(row1);
var select1 = grid.select();
var dataType1 = grid.dataItem(select1);
}
});