My keydown event does not work when navigatable is set to false.Can i get a solution for this.
1 Answer, 1 is accepted
0
Stefan
Telerik team
answered on 22 Aug 2016, 01:02 PM
Hello Naga,
The keydown event is not fired when the navigatable property of the Grid is set to false because the Kendo UI Grid table does not have focus. The event is only fired for elements that have the focus like form elements (textboxes, etc) or non-form elements with a tabindex attribute. When the navigatable property of the Grid is set to true, the Grid table has a tabindex attribute, so it can receive focus and the keydown event is fired.
Also, I noticed that the selectable property of the Grid is set to 'multiple cell'. I can suggest two approaches depending on if multiple selection is required or not:
1) Without multiple selection - add a tabindex attribute to the Grid' table after initialization. After the user clicks on the Grid, the Grid table will be focused, and the keydown event can be fired:
grid.table[0].tabIndex = 0;
2) With multiple selection enabled, the mousedown event is prevented, and the Grid table cannot be focused. I can suggest manually focusing the table in the change event of the Grid: