Reputation: 11642
I would like to use UP and DOWN Arrow Keys to navigate over the rows in Kendo Grid. LEFT and RIGHT Arrow Keys to navigate over the the cells in Kendo Grid.
I tried to find something in official documentation, but without luck:
http://demos.telerik.com/kendo-ui/grid/keyboard-navigation
How can i do it i Kendo Grid please?
Thanks for any help.
Upvotes: 3
Views: 2605
Reputation: 3062
You can do this using keydown event on grid:
var data = $("#grid").data('kendoGrid');
var arrows = [37, 38, 39, 40];
data.table.on("keydown", function (e) {
console.log(e.keyCode);
if (arrows.indexOf(e.keyCode) >= 0) {
setTimeout(function () {
data.select($("#grid_active_cell"));
},1);
}
});
Upvotes: 2