Sriram,
This is achievable through using the proper jQuery selectors and methods to identify the currently focused Grid and the next Grid that has to be focused.
Here's the example: https://dojo.telerik.com/emaZaWoC
And the modified keydown handler:
$(document.body).keydown(function(e) {
if (e.altKey && e.keyCode == 87) {
if($(':focus').length && $($(':focus')[0]).hasClass("k-selectable")) {
var currentGrid = $(':focus').closest(".k-grid");
$("#example>.k-grid").not(currentGrid).first().data("kendoGrid").table.focus();
}
else {
$("#grid1").data("kendoGrid").table.focus();
}
}
});
In this case only the Alt + W key combination is used. When the first Grid is focused pressing Alt + W again will focus the second Grid.
Note that in the line that focuses the next Grid the container of the Grids <div id="example"> is used as a selector. This is needed, in order to find the next Grid:
$("#example>.k-grid").not(currentGrid).first().data("kendoGrid").table.focus();
If in your scenario the Grids are not nested in a common container, you might have to use a different selector, to get an element that is higher in the DOM elements hierarchy, an element that is parent of both Grids, or even the body element.
Additionally, if there are more Grids in different places on the page, you will have to implement some custom logic that determines the order of focusing each one of them.
Regards,
Ivan Danchev
Progress Telerik