如何在JQGrid中的单独列中进行垂直滚动

时间:2013-02-18 16:16:13

标签: javascript jqgrid scroll

我在JQGrid中有一个网格 我的列表很长,所以右边有一个垂直滚动

但是此滚动条位于最后一列不在右侧的单独栏上 像这样 enter image description here

我怎样才能在一个单独的栏目中创作?

查看错误结果:here

查看代码:here

1 个答案:

答案 0 :(得分:0)

在末尾添加一个空白列,然后滚动条将转到那里。

为此,请通过以下方法在网格设置中为数据行添加空白值:

        beforeProcessing: function (data, status, xhr) {
            //add the spaces to the returned data to allow for the blank vertical columns in the grid
            for (var x = 0, length = data.rows.length; x < length; x++) {
                data.rows[x].cell.splice(5,0, "");
            }//for
        }, //beforeProcessing 

为列添加额外值:

 'Fournisseur<br/>Commande',
              'Contenu', ''],

然后添加空白列定义:

 { name: "empty1", width: 10, sortable: false, hidedlg: true, search: false, resizable: false, fixed: true },