ZX10Tomcat

Forum Replies Created

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • in reply to: jQGrid keyboard navigation on grid with subgrids #102149
    ZX10Tomcat
    Participant

    Thank you for your answer!

    But I think the problem isn’t in it, I’m already have idprefix. here’s my grid definitions (sorry for messy).

    $(“#EditTimeGrid”).jqGrid({
    datatype: “local”,
    loadonce: true,
    multiselect: false,
    data: mainData,
    scrollrows: true,
    height: “100%”,
    colNames: [‘@Resource.ID’, ”, ‘MainID’, ‘FullDate’, ‘@Resource.Date’, ‘@Resource.Day’, ‘DayNum’, ‘@Resource.Project_Category’,
    ‘@Resource.Start’, ‘@Resource.End’, ‘@Resource.Lunch’, ‘@Resource.BillHours’, ‘@Resource.NonBillHours’, ‘@Resource.TotalHours’,
    ‘@Resource.Notes’, ”, ‘start’, ‘end’, ”, ”],

    rowattr: function (rd) {
    return { “class”: “boldRow” };
    },
    rowNum: 10,
    //rowList: [5, 10, 20],
    //gridview: true,
    cellEdit: editMode,
    cellsubmit: ‘clientArray’,
    ignoreCase: true,
    rownumbers: true,
    // sortname: ‘DayAsNumber’,
    // sortorder: “asc”,
    viewrecords: true,
    autoencode: true,
    footerrow: true
    , idPrefix: “s_”

    , subGrid: true

     

    and for subgrid

    $subgrid.jqGrid({
    datatype: “local”
    , scrollrows: true
    , multiselect: false
    , data: sd

    , height: “100%”
    , rowNum: 10
    , autoencode: true
    //gridview: true,
    , cellEdit: editMode
    , cellsubmit: ‘clientArray’
    , idPrefix: rowId + “_”

     

    I’ve made some investigation and found a function in the jquery.jqgrid.src.js file

    (line 10282)

    .keydown(function (e) {

    switch (kdir) {
    case 38:
    if ($t.p.iRow – 1 > 0) {
    scrollGrid($t.p.iRow-1,$t.p.iCol,’vu’);
    $($t).jqGrid(“editCell”,$t.p.iRow-1,$t.p.iCol,false);
    }
    break;

     

    If we press right or left arrow, we found next visible column, but if we pressed up or down key we just go to next or previous row, even if it’s a subgrid’s invisible row.  Maybe I’m wrong with my opinions.

Viewing 1 replies (of 1 total)

Stay connected with us in your favorite flavor!