Hello again,
how can i select a grid row,based on the value or the text of a dropdownlist?
first of all,i looked over the demo api on kendo site, and the code
@{
ViewBag.Title = "GridApi";
}
<h2>GridApi</h2>
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
columns: [
{ field: "name" },
{ field: "age" }
],
dataSource: [
{ name: "Jane Doe", age: 30 },
{ name: "John Doe", age: 33 },
]
});
var grid = $("#grid").data("kendoGrid");
var row = grid.tbody.find("tr:eq(0)"); OR variant 2: var rowIndex=1;row = grid.tbody.find(">tr:not(.k-grouping-row)").eq(rowIndex);
var data = grid.dataItem(row);
grid.select(row);
console.log(data.name); // displays "Jane Doe"
</script>
i attached a picture with the error in firebug.
how can i select a grid row,based on the value or the text of a dropdownlist?
first of all,i looked over the demo api on kendo site, and the code
@{
ViewBag.Title = "GridApi";
}
<h2>GridApi</h2>
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
columns: [
{ field: "name" },
{ field: "age" }
],
dataSource: [
{ name: "Jane Doe", age: 30 },
{ name: "John Doe", age: 33 },
]
});
var grid = $("#grid").data("kendoGrid");
var row = grid.tbody.find("tr:eq(0)"); OR variant 2: var rowIndex=1;row = grid.tbody.find(">tr:not(.k-grouping-row)").eq(rowIndex);
var data = grid.dataItem(row);
grid.select(row);
console.log(data.name); // displays "Jane Doe"
</script>
i attached a picture with the error in firebug.