ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: mscodigno on May 11, 2021, 03:14:14 pm
-
Hello, I want to add navigation with arrow keys to the editor. I tried this topic but it didn't work.
https://paramquery.com/forum/index.php?topic=2630.msg10101#msg10101
http://jsfiddle.net/zekeriyaerogluu/kqmzv45u/41/
-
That one is a different topic.
How exactly do you want to add navigation with arrow keys to the editor. Please describe your requirements.
-
I want to switch to text boxes in other cells with the arrow keys when the text box is open
-
editorKeyDown: function(evt, ui) {
var obj = $.extend({}, ui), editCell;
if(evt.keyCode == $.ui.keyCode.DOWN){
obj.rowIndx++;
obj.rowIndxPage++;
editCell = true;
}
else if (evt.keyCode == $.ui.keyCode.RIGHT){
obj.colIndx++;
editCell = true;
}
if(editCell){
this.saveEditCell();
this.editCell(obj)
return false;
}
},
https://jsfiddle.net/ah74vkt2/2/
Above is a simple outline of the code and involved event.
Please update the logic to include checks for boundary conditions ( rowIndx should not be < 0 and should not exceed data length etc ) and if there are any hidden rows or columns.
-
Hello, thanks for the answer.
keyCode.RIGHT or LEFT: How can I skip the non-editable colons and switch to the other column?
keyCode.DOWN or UP: How can I skip summary and group headings and skip to other lines?
-
non editable columns can be identified by column.editable == false condition.
group headings have row meta data rowData.pq_gtitle = true
group summary rows have row meta data rowData.pq_gsummary = true
So keep on incrementing obj.colIndx++ until editable column is found and increment obj.rowIndx++ and obj.rowIndxPage++ until non grouping title / summary row is found.
Hope it helps.
-
I couldn't. Can you help me?
https://jsfiddle.net/zekeriyaerogluu/7qhacfxt/11/