Question

i am doing inline editing on jqgrid. The editing is working perfectly. After editing, the user presses enter key, and it is saved. But now i want the user to use arrow keys (up and down keys to navigate through the rows and left and right keys to navigate through the cells) in navigating through the rows and when a row loses focus, the row is saved. is this possible?

Was it helpful?

Solution

Have you tried using the bindKeys method? From the jqGrid docs:

bindKeys

Parameters:

{ 
  onEnter: null, 
  onSpace: null, 
  onLeftKey: null, onRightKey: null, 
  scrollingRows : true 
}

Description:

When called the method make it so that it is possible to select a row with Up and Down keys - i.e we scroll the grid data with keys. It is possible to invoke additional events when the row is selected and a key like enter, space, left or right are pressed. To these events a selected id of the row is passed as parameter.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top