ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: stancao on September 17, 2021, 03:33:07 am
-
Hi,
I want to know that, do the left and right arrow keys work if the grid cell is on edit mode just like up and down arrow keys can do?
Thank you!
Stan
-
Hi Stan
There is no ready to use option for it, but it can be customized using editorKeyDown event:
https://paramquery.com/pro/api#event-editorKeyDown
e.g. on left key, select the previous cell by decrementing the colIndx of current cell and return false to prevent default behavior inside the editor.
editorKeyDown: function(evt, ui){
if(evt.originalEvent.keyCode == $.ui.keyCode.LEFT){
ui.colIndx--;
this.setSelection(ui);
return false;
}
},
TODO: you would also need to check boundary conditions, e.g. if its the first leftmost cell, then it can't move further left.
-
Thank you and they are working now! :)