5

似乎 jqgrid 默认情况下以正常的表格方式在顶部水平布置列。这在大多数情况下都很棒,但是我有一种情况,我只想显示 1 条单条记录,但我希望列垂直向下移动到屏幕的左侧。每个数据值都将位于左侧列标题的右侧。这张表有大约 30 列,太多了,无法跨过顶部,我不想使用水平滚动。

我想在我的 jqgrid 中使用这种类型的方向:

Col1    Foo1
Col2    Foo2
Col3    Foo3

不像这样:

Col1   Col2    Col3
Foo1   Foo2    Foo3
Foo4   Foo5    Foo6

而且它永远只有 1 条记录。我怎样才能做到这一点?以及如何启用垂直滚动条?我希望用户能够向下滚动屏幕以查看所有列。

4

3 回答 3

0

看起来我想要做的事情是 jqgrid 不可能的: http ://www.trirand.net/forum/default.aspx?g=posts&m=8186

如果有人认为这是可能的,请告诉我。:-)

我想我必须为我的 1 记录详细信息场景构建自定义布局。没什么大不了的。

于 2012-03-01T15:43:14.913 回答
0

如何在网格前面添加一列,然后使用格式化程序生成 html。

完成后,您可以隐藏其他列。这假设所有内容都正确设置在网格上,例如列(colNames 和 colModel)和来自服务器的 json。

另外,鉴于您的简单示例,我认为您尝试布局的内容可能会有些混乱

Col1 Foo1 Col2 Foo2 Col3 Foo3

我认为您希望能够支持某种类型的“表单”的布局,该“表单”由从服务器检索的数据组成,不一定是 2 列,而是脱节的布局。我可能是错的。

function detailFormatter(cellvalue, options, rowObject) {

    var content = "<form>";
               content += "<fieldset>";
               content += "<legend>Personalia:</legend>";
               content += "Name: <input type='text' value='" + rowObject[3] + "' /><br />";
               content += "Email: <input type='text' /><br />";
               content += "Date of birth: <input type='text' />";
               content += "</fieldset>";
               content += "</form>";

    return content;
}


var col_names = ['', 'Qty', 'ATR', 'Item #', 'Brand', 'Product', 'Catalog', 'Price', 'UOM', 'Case', 'Remarks', 'Wt.', 'ProductId'];
var col_model = [
{ name: 'Details', index: 'Details', formatter: detailFormatter },
{ name: 'Quantity', index: 'Quantity', width: 22, title: false, sorttype: "number", editable: true, edittype: 'text', editoptions: { size: 10, maxlength: 15} },
{ name: 'ProductAttributes', index: 'ProductAttributes', hidden: true },
{ name: 'ItemNum', index: 'ItemNum', width: 50, align: "right" },
{ name: 'BrandName', index: 'BrandName', width: 100 },
{ name: 'ProducName', index: 'ProducName', width: 150 },
{ name: 'Catalog', index: 'Catalog', width: 100 },
{ name: 'Price', index: 'Price', width: 40, sorttype: "number", align: "right" },
{ name: 'UOM', index: 'UOM', width: 30 },
{ name: 'CasePack', index: 'CasePack', width: 30 },
{ name: 'PackageRemarks', index: 'PackageRemarks', width: 80 },
{ name: 'AveWeight', index: 'AveWeight', width: 30, title: false, align: "right" },
{ name: 'ProductId', index: 'ProductId', hidden: true, key: true }



productGrid = $('#productGrid');

productGrid.jqGrid({
    scroll: 1,
    url: '/Buyer/ProductSearch/ProductsDetailService/',
    datatype: 'json',
    ajaxGridOptions: { contentType: "application/json" },
    jsonReader: {
        root: 'rows',
        page: 'page',
        total: 'total',
        records: 'records',
        repeatitems: true,
        cell: "cell",
        id: "ProductId"
    },
    colNames: col_names,
    colModel: col_model,
    rowNum: 100, // number of records per page
    mtype: "GET",
    rownumbers: true,
    rownumWidth: 40,
    height: 600,
    autowidth: true,
    sortable: true, // enable column sorting
    multiselect: true, // enable multiselct
    gridview: true,
    pager: $('#productPager'),
    viewrecords: true,
    loadui: 'block',
    emptyrecords: 'Nothing to display',
    loadComplete: function () {
        var gd = $('#productGrid');
        //fixGridSize(gd); 
    }
});

从端点返回的示例数据。(可以稍微清理一下)

{"total":131,"page":1,"records":13051,"rows":[{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","24.42","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","26.26","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.5","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","24.92","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","26.39","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","24.48","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","24.75","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.43","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.61","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.87","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.06","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.37","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","26.51","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.24","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.65","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.34","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.27","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","26.11","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","26.19","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","24.81","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.76","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.62","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.49","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.81","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":1326807001,"cell":["","1","X~X~X~X~X~X~X~X","5522479","LABELLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.99","CA","20 PK","1 LB","20 LB","1326807001"]},{"id":2047556844,"cell":["","1","X~X~X~X~X~X~X~X","6706700","","2 LT OP PEND PB 6103-34E###","BE National Catalog","135.5","EA","1","","","2047556844"]},{"id":2047557330,"cell":["","1","X~X~X~X~X~X~X~X","6935200","","PENDANT 17 1/4in. 1LT SIENNA FINISH","BE National Catalog","177.51","EA","1","","","2047557330"]},{"id":2047557264,"cell":["","1","X~X~X~X~X~X~X~X","6924100","","5LT PEND PLAT FRST WHT ALBSTR GL","BE National Catalog","111.5","EA","1","","","2047557264"]},{"id":2047557039,"cell":["","1","X~X~X~X~X~X~X~X","6765700","","MOUNTING BRKT FOR 2 MINI PENDS WHT","BE National Catalog","15.28","EA","6","","","2047557039"]},{"id":2047554940,"cell":["","1","X~X~X~X~X~X~X~X","2288300","","4\u0027 PENDANT CORD SET WHT","BE National Catalog","14.37","EA","50","","","2047554940"]},{"id":4350187308,"cell":["","1","X~X~X~X~X~X~X~X","7827530","PENNANT","DOUGH ROLL VIENNA","Sysco Products Catalog","41.3","CA","216 PK","2 OZ","27 LB","4350187308"]},{"id":4350187308,"cell":["","1","X~X~X~X~X~X~X~X","7827530","PENNANT","DOUGH ROLL VIENNA","Sysco Products Catalog","39.94","CA","216 PK","2 OZ","27 LB","4350187308"]},{"id":2047556653,"cell":["","1","X~X~X~X~X~X~X~X","6682100","","1LT OUTDR PEND BLK CST AL FRST GLS","BE National Catalog","19.53","EA","6","","","2047556653"]},{"id":4284822563,"cell":["","1","P~X~X~X~X~X~X~X","DA7671","Lawson Products","(qty 3) Open & Shut Bolt Loose","BE National Catalog","25.77","CS","1","","","4284822563"]},{"id":1746213061,"cell":["","1","P~X~X~X~X~X~X~X","595671","","X-Acto(R) By Boston(R) School Pro(TM) Electric Pencil Sharpener","BE National Catalog","42.74","EA","","","","1746213061"]},{"id":3012148986,"cell":["","1","P~X~X~X~X~X~X~X","CEB34X36","","Tape, Magic, 19mm x 33m, refill","Staples\\Corporate Express - Canada","1.11","EA","1","","","3012148986"]},{"id":2263809510,"cell":["","1","P~X~X~X~X~X~X~X","593785","","Sanford(R) Uni-Ball(R) Signo Gelstick(TM) Pens, 0.7 mm, Medium Point, Blue Barrel, Blue Ink, Pack Of 12","BE National Catalog","6.23","DZ","","","","2263809510"]},{"id":3083479466,"cell":["","1","P~X~X~X~X~X~X~X","MDS131020","","PENLIGHT,DISPOSABLE,6/PK","MEDLINE - WIST","9.98","PK","6","","","3083479466"]},{"id":3083479466,"cell":["","1","P~X~X~X~X~X~X~X","MDS131020","","PENLIGHT,DISPOSABLE,6/PK","MEDLINE - SMGT","7.69","PK","6","","","3083479466"]},{"id":3083479466,"cell":["","1","P~X~X~X~X~X~X~X","MDS131020","","PENLIGHT,DISPOSABLE,6/PK","MEDLINE - THS","3.93","PK","6","","","3083479466"]},{"id":3083479466,"cell":["","1","P~X~X~X~X~X~X~X","MDS131020","","PENLIGHT,DISPOSABLE,6/PK","MEDLINE - LSSM","8.44","PK","6","","","3083479466"]},{"id":3083479466,"cell":["","1","P~X~X~X~X~X~X~X","MDS131020","","PENLIGHT,DISPOSABLE,6/PK","MEDLINE - WALKER","7.78","PK","6","","","3083479466"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.48","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.48","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","20.33","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","17.98","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.48","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","20.82","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.48","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.48","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","17.98","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.15","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.03","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","17.98","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.15","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","25.81","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","20.82","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.73","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.48","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","22.02","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":1769105211,"cell":["","1","X~X~X~X~X~X~X~X","7967946","BARILLA","PASTA PENNE RIGATE","Sysco Products Catalog","21.78","CA","2 PK","10 LB","20 LB","1769105211"]},{"id":3868776945,"cell":["","1","X~X~X~X~X~X~X~X","23371","","SLOAN 601 PENAL VALVE,6-3/4\"L","BE National Catalog","227.73","EA","","","","3868776945"]},{"id":1771696671,"cell":["","1","P~X~X~X~X~X~X~X","BICMM11","","Pen, Ball point, Retractable, Medium, 4colour","Staples\\Corporate Express - Canada","3.28","EA","1","","","1771696671"]},{"id":1771702789,"cell":["","1","P~X~X~X~X~X~X~X","PENBLN15A","","Pen, Roller, ENERGEL, .5mm, Black","Staples\\Corporate Express - Canada","2.5","EA","1","","","1771702789"]},{"id":1771703397,"cell":["","1","P~X~X~X~X~X~X~X","SAN60143","","Pen, Uniball, Onyx, .7mm, Black","Staples\\Corporate Express - Canada","0.93","EA","1","","","1771703397"]},{"id":1771703401,"cell":["","1","P~X~X~X~X~X~X~X","SAN60152","","Pen, Uniball, Micro, .5mm, Red","Staples\\Corporate Express - Canada","1.65","EA","1","","","1771703401"]},{"id":1771703921,"cell":["","1","P~X~X~X~X~X~X~X","STD51163","","Sharpener, Pencil, Noris, Plastic","Staples\\Corporate Express - Canada","3.75","EA","1","","","1771703921"]},{"id":1777244009,"cell":["","1","P~X~X~X~X~X~X~X","149039","","Prismacolor(R) Col-Erase(R) Pencils, Blue, Box Of 12","BE National Catalog","9.49","BX","","","","1777244009"]},{"id":2047557554,"cell":["","1","X~X~X~X~X~X~X~X","6984100","","1LT PEND (DM) WRM GLD SCAVO GLS","BE National Catalog","27.45","EA","4","","","2047557554"]},{"id":3868776906,"cell":["","1","X~X~X~X~X~X~X~X","23675","","SLOAN 611 PENAL VALVE,9-3/4\"L","BE National Catalog","303.58","EA","","","","3868776906"]},{"id":2847053310,"cell":["","1","X~X~X~X~X~X~X~X","39834","PENNANT","PASTRY DGH PUFF WHI","AFI Foodservice","46.67","CS","2","15 LB","31.00 LB","2847053310"]},{"id":2028575199,"cell":["","1","X~X~X~X~X~X~X~X","HP16918","","HENNY PENNY ORIFICE","BE National Catalog","23.77","EA","1","","","2028575199"]},{"id":2263805248,"cell":["","1","P~X~X~X~X~X~X~X","527056","","Pilot(R) Dr. Grip(TM) Center Of Gravity Ballpoint Pen, 0.7 mm, Medium Point, Pink Metallic Barrel, Black Ink","BE National Catalog","5.69","EA","","","","2263805248"]},{"id":2263825833,"cell":["","1","P~X~X~X~X~X~X~X","863200","","Paper Mate(R) Write Bros. Grip Ballpoint Stick Pens, 1.0 mm, Medium Point, Red Barrel, Red Ink, Pack Of 12","BE National Catalog","1.79","DZ","","","","2263825833"]},{"id":1735210354,"cell":["","1","P~X~X~X~X~X~X~X","907336","","Sanford(R) Uni-Ball(R) Vision(TM) Liquid Ink Rollerball Pens, 0.7 mm, Fine Point, Gray Barrel, Blue Ink, Pack Of 12","BE National Catalog","14.66","DZ","","","","1735210354"]},{"id":2559697016,"cell":["","1","X~X~X~X~X~X~X~X","810360","DE CECCO","PASTA PENNE RIGATE #41 OU","Ace Endico","28.24","CS","20/1 LB","","24","2559697016"]},{"id":4354802160,"cell":["","1","P~X~X~X~X~X~X~X","CARNGXDIS-235","","GOODKIND PEN-WOODY","BE National Catalog","3.55","EA","1","","","4354802160"]},{"id":2795617689,"cell":["","1","X~X~X~X~X~X~X~X","158303","","03259 PROF LINE FEBREZE RTU DEEP PENETR 945ML@8","Unisource - Canada","63.56","CS","8","","","2795617689"]},{"id":3098309987,"cell":["","1","P~X~X~X~X~X~X~X","44354","","TRAY SCHOOL PENNY-SAVER NAVY BLUE 10X14","BE National Catalog","88.5","CS","24","","","3098309987"]},{"id":3150562359,"cell":["","1","P~X~X~X~X~X~X~X","2757WPEN","","WESTIN KIDS COLORED PENCILS","BE National Catalog","98.36","CA","144","","","3150562359"]},{"id":3150562359,"cell":["","1","P~X~X~X~X~X~X~X","2757WPEN","","WESTIN KIDS COLORED PENCILS","Canadian Hotel Supply","111.61","CA","144","","","3150562359"]},{"id":3161067816,"cell":["","1","P~X~X~X~X~X~X~X","NONHCR3710C","","LINER,CLEAR,30X37,10 MIC,30 GAL,25/RL","MEDLINE - WIST","28.11","CS","500","","","3161067816"]},{"id":3161067816,"cell":["","1","P~X~X~X~X~X~X~X","NONHCR3710C","","LINER,CLEAR,30X37,10 MIC,30 GAL,25/RL","MEDLINE - EBY","22.77","CS","500","","","3161067816"]}]}
于 2012-04-05T21:07:21.820 回答
0

您并在网格加载完成中打开编辑表单,然后隐藏网格。

您可以使用将网格移出浏览器屏幕

   jQuery.extend(jQuery.jgrid.edit, { 
           height: 1, 
           width: 1, 
           top:-100, 
           left: -100 
    } ); 

创建网格后,在 loadComplete 中调用其方法以显示表单:

$("#edit_grid_top").click() 
于 2012-04-06T08:11:18.850 回答