ParamQuery grid support forum
General Category => Help for ParamQuery Grid (free version) => Topic started by: codexyz on November 13, 2014, 10:31:01 am
-
Hi.
some question. How control horizonScroll by Keyboard(left, right).
-----------------------------------------------------
I set option
selectionModel: {type: 'row', mode: 'single' }
-----------------------------------------------------
keyboard left, right key -> How horizonScroll Control ?
now, keyboard left, right key -> next Row selected or prev Row selected.
ps) I'm not english very well. T,.T
-
That's by design. Keyboard navigation works along with selectionModel.
If it's type = 'row' then left / right keys move the row selection up/down respectively.
-
keyboard left, right key -> horizonScroll Control
i customized pqgrid PRO...
_pKeyNav._bodyKeyPressDown = function(evt) {
....
if (evt.keyCode == keyCodes.LEFT) {
var decr = 0;
if (SM.type == "row" && $(that.$hscroll)[0].style.display != 'none') {
$(that.$hscroll).children('.left-btn').trigger('click');
decr = 1;
}
var obj = this._decrIndx(rowIndxPage, colIndx);
if (obj) {
rowIndx = obj.rowIndxPage + offset + decr;
this.select({
rowIndx: rowIndx,
colIndx: obj.colIndx,
evt: evt
})
}
evt.preventDefault();
return
} else {
if (evt.keyCode == keyCodes.RIGHT) {
var incr = 0;
if (SM.type == "row" && $(that.$hscroll)[0].style.display != 'none') {
$(that.$hscroll).children('.right-btn').trigger('click');
incr = -1;
}
var obj = this._incrIndx(rowIndxPage, colIndx);
if (obj) {
rowIndx = obj.rowIndxPage + offset + incr;
this.select({
rowIndx: rowIndx,
colIndx: obj.colIndx,
evt: evt
})
}
evt.preventDefault();
return
} else {
.....
}
......
keyboard left, right key -> horizonScroll Control very Well.
but, row focus(dotted box) missed.... T.T
What's a matter?