ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: cijojohn on December 08, 2017, 07:15:42 pm
-
Hi Team,
We want to customize the tab functionality in such a way that when it reaches to the last cell in the row, next tab should not focus to the first cell in the next row. Similarly for shift+tab ,if it is first cell in row, it should not go to the end of the previous row.
See the attached snapshot.
we are in the last cell of third row. Now if i press tab key, the focus will move to the first cell in the next row(Sno in this case). We want to restrict this behavior in our grids.
Please suggest ASAP
-
Please add this to the initialization object of grid.
beforeCellKeyDown: function(evt, ui){
var keyCode = evt.keyCode,
KC = $.ui.keyCode;
if(ui.colIndx==this.getColModel().length-1){
if( (keyCode == KC.TAB && !evt.shiftKey) || keyCode == KC.RIGHT)
return false;
}
else if(ui.colIndx == 0){
if( (keyCode == KC.TAB && evt.shiftKey ) || keyCode == KC.LEFT)
return false;
}
}
http://jsfiddle.net/qpjgfmvt/
-
can u suggest something similar for PQ 3.3 version? I think this event "beforeCellKeyDown" works for PQ version 4.
Thanks
-
use cellKeyDown instead of beforeCellKeyDown in v3
-
In v5, this is the default behaviour of key navigation.