jqGrid:添加子网格后,父网格的冻结列不起作用

jqGrid: Frozen columns of parent grid not working after adding subgrid

我有一个带有子网格的 jqgrid。我将父网格和子网格中的几列冻结。子网格上的冻结列工作正常,但它不适用于父网格。

当我通过将 subGrid 设置为 false 来禁用子网格时,冻结的行在父级上完美运行。

我是否遗漏了任何阻止父网格上的冻结列工作的东西?

这是我的 jqgrid:

$(function () {
"use strict";
var myData = {
        id: "509403957ae7d3929edcb812",
        name: "MYBOOK",
        chapters: [
            {
                name: "myfirstchapter",
                sequence: 10,
                title: "My First Chapter",
                filetype: "tex", 
                col3: "a", 
                col4: "b",
                files: [
                    { filetype: "tex", name: "myfile1", col3: "a", col4: "b" },
                    { filetype: "doc", name: "myfile2", col3: "c", col4: "d" },
                    { filetype: "doc", name: "myfile3", col3: "e", col4: "f" },
                ]
            },
            {
                name: "mysecondchapter",
                sequence: 20,
                title: "My Second Chapter",
                filetype: "tex", 
                col3: "a", 
                col4: "b",
                files: [
                    { filetype: "tex", name: "myfirstfile", col3: "a", col4: "b" },
                    { filetype: "tmpl", name: "myfileb", col3: "c", col4: "d" },
                ]
            }
        ]
    },
    $grid = $("#list");

$grid.jqGrid({
    datatype: "local",
    data: myData.chapters,
    colNames: ["Sequence", "Name", "Title", "Filetype", "col3", "col4"],
    colModel: [
        {name: "sequence", width: 65, key: true, frozen: true },
        {name: "name", width: 200, frozen: true },
        {name: "title", width: 150},
        {name: "filetype", width: 130},
        {name: "col3", width: 130},
        {name: "col4", width: 130}
    ],
    rowNum: 3,
    rowList: [3, 5, 10],
    pager: "#pager",
    gridview: true,
    ignoreCase: true,
    rownumbers: true,
    sortname: "sequence",
    viewrecords: true,
    height: "auto",
    autowidth: false,
    shrinkToFit: false,
    width: 600,
    subGrid: true,
    subGridRowExpanded: function (subgridId, rowid) {
        var $subgrid = $("<table id='" + subgridId + "_t'></table>");
        $subgrid.appendTo("#" + subgridId);
        $subgrid.jqGrid({
            datatype: "local",
            data: $(this).jqGrid("getLocalRow", rowid).files,
            colNames: ["Name", "Filetype", "col3", "col4"],
            colModel: [
                {name: "name", width: 130, key: true, frozen: true},
                {name: "filetype", width: 130, frozen: true},
                {name: "col3", width: 130},
                {name: "col4", width: 130}
            ],
            height: "100%",
            rowNum: 10,
            sortname: "name",
            shrinkToFit: false,
            autowidth: true,
            idPrefix: "s_" + rowid + "_"
        }).jqGrid("setFrozenColumns");
    }
});
$grid.jqGrid("navGrid", "#pager", {add: false, edit: false, del: false});
$grid.jqGrid("setFrozenColumns");

});

在 Guriddo 中,当冻结列打开时不能使用 jqGrid 子网格。

Here you can read Guriddo jqGrid 的所有限制。 我们不知道这在 free-jqgrid 中如何。