jqgrid在最后一列之后删除空的标题单元格 [英] jqgrid remove empty header cell after the last column

查看:387
本文介绍了jqgrid在最后一列之后删除空的标题单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的jqgrid中有一个奇怪的行为。我突然注意到,在我最后一栏之后有一个空白的标题单元格,我想摆脱它。任何想法如何?

There is a weird behavior in my jqgrid. I suddenly noticed that there is a blank header cell after my last column and I want to get rid of it. Any idea how?

以下是我的jqgrid的定义:

Here is the definition of my jqgrid:

myGrid.jqGrid({
    colNames: ['Order Id', 'a', b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
      j', 'k', 'l', 'm'],
    colModel: [
      { name: 'OrderId', index: 'OrderId', width: 58, editable: false, align: 'center' },
      { name: 'a', index: 'a', width: 68, editable: false, align: 'center', sortable: false },
      { name: 'b', index: 'b', width: 43, editable: false, align: 'center', sortable: false },
      { name: 'c', index: 'c', width: 48, editable: false, align: 'center', sortable: false },
      { name: 'd', index: 'd', width: 63, editable: false, align: 'center', sortable: false },
      { name: 'e', index: 'e', width: 123, editable: false, align: 'center', sortable: false },
      { name: 'f', index: 'f', width: 73, editable: false, align: 'center', sortable: false },
      { name: 'g', index: 'g', width: 123, editable: false, align: 'center', sortable: false },
      { name: 'h', index: 'h', width: 73, editable: false, align: 'center', sortable: false },
      { name: 'i', index: 'i', width: 78, editable: false, align: 'center', sortable: false },
      { name: 'j', index: 'j', width: 117, editable: false, align: 'center', sortable: false },
      { name: 'k', index: 'k', width: 53, editable: false, align: 'center', sortable: false },
      { name: 'l', index: 'l', width: 73, editable: false, align: 'center', sortable: false},
      { name: 'm', index: 'm', width: 43, editable: false, align: 'center', sortable: false}        ],
    pginput: false,
    pgbuttons: false,
    hidegrid: false,
    pager: '#divPager',
    gridview: true,
    rownumbers: true,
    rownumWidth: 20,
    caption: 'Trading Positions',
    loadonce: true,
    viewrecords: true,
    recordtext: "",
    emptyrecords: "No trading positions to display",
    shrinkToFit: false
  });


推荐答案

空白空间为可能的垂直滚动条保留。如果您将 height:auto height:100%或如果您使用 scrollOffset:0 它不会在网格中显示额外的空白空间。

The empty space is reserved for the possible vertical scrollbar. If you place height: "auto" or height: "100%" or if you would use scrollOffset: 0 it will be no additional empty space displayed in the grid.

这篇关于jqgrid在最后一列之后删除空的标题单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆