I use belowe code to get selected code but I need get current Row Index to move up abd down , How can I get row index of selecetd Item : my code :
$("#btnup").click(function () {
var grid = $("#grid").data("kendoGrid");
var selectedItem = grid.dataItem(grid.select());
if (selectedItem != undefined) {
alert("The Row Is SELECTED");
// here need row index
}
else
alert("NO Row Is SELECTED")
});
Please try with the below code snippet.
$("#btnup").click(function () {
var grid = $("#grid").data("kendoGrid");
var selectedItem = grid.dataItem(grid.select());
if (selectedItem != undefined) {
// I have added selected row index on below code line
alert("The Row Is SELECTED at index: " + grid.select().index());
}
else
alert("NO Row Is SELECTED")
});
Let me know if any concern.