joo

Forum Replies Created

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • in reply to: Keyboard navigation on jqgrid with subgrid #101447
    joo
    Participant

    You should patch jqGrid, because up/down key handling fails, when subgrid is opened.

    if(event.keyCode === 38 ){

    r = target.previousSibling;

    id = “”;

    if(r) {

    if($(r).is(“:hidden”) || !$(r).hasClass('jqgrow')) {

    while(r) {

    r = r.previousSibling;

    if(!$(r).is(“:hidden”) && $(r).hasClass('jqgrow')) {id = r.id;break;}

    }

    } else {

    id = r.id;

    }

    }

    $($t).jqGrid('setSelection', id, true, event);

    event.preventDefault();

    }

    || !$(r).hasClass('jqgrow') is my patch, beacause when you open the subgrid r will be the row of subgrid. If the subgrid is closed it's operate by reason of “:hidden”.

    bruno123 said:

    I'm using the bindkeys function in jqgrid to navigate with my keyboard on the grid

    $("#List").jqGrid('bindKeys');

    But the problem is that I also use a subgrid row to show some values :

    subGridRowExpanded: function (subId, id) {
    $("#" + subId).append($('#List').getCell(id, 'detail'));
    }

    That makes it impossible to use the down key to select the next row (the selected row expands when the user selects the row). If the user closes the subgrid row, he can use the down key again. The subgrid row is blocking the navigation if opened.

    On the other hand, the up key is always working.


Viewing 1 replies (of 1 total)

Stay connected with us in your favorite flavor!