Use Enter key to add new row

Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

I'm attempting to use the following code to enable the enter key to work as a tab to add a new row to the grid:

function HandleKeyDown(gridId) { var grid = ISGetObject(gridId);

var ac = grid.getActiveEditCell();

if (ac.rowElement.type == "NewRow") { if (event.keyCode == 13) // If Enter key is pressed event.keyCode = 9; // change it to Tab

}

return true; // continue default processing.

}

 

If I assign it to OnEditKeyDown, I get an error  (see attached).  If I assign it to OnKeyDown, I must press the enter key twice to add the row.

Any help would be greatly appreciated.

 

 

1 attachment
All times are GMT -5. The time now is 2:27 AM.
Previous Next