记录数少于行数-垂直滚动条 [英] Number of records inferior to the number of rows - vertical scrollbar
问题描述
如果是reccount < rownum
,那么我在最后一列之后有一个空列".如何避免这种现象?实际上,此列具有垂直滚动条的尺寸!
If reccount < rownum
then I have an "empty column" after the last column. How to avoid this phenomena? In fact this column has the dimension of the vertical scrollbar!
推荐答案
右,即使网格中没有足够的行来需要滚动条,通常也会为垂直滚动条保留空间.参见 jqgrid-is-there-a-way -始终显示垂直滚动条,以获取有关如何始终显示垂直滚动条以确保空间被填充的一些想法.
Right, space is often reserved for a vertical scrollbar even if there are not enough rows in the grid to require a scrollbar. See jqgrid-is-there-a-way-to-always-display-a-vertical-scrollbar for some ideas on how to always display the vertical scrollbar, to ensure the space is filled.
或者,如果您知道将没有足够的行需要滚动条,则可以将scrollOffset
设置为0
来回收空间.从 jqGrid文档:
Alternatively, if you know there will never be enough rows to require the scrollbar, you can set the scrollOffset
to 0
to reclaim the space. From the jqGrid documentation:
scrollOffset
整数
确定垂直滚动条的宽度.由于不同的浏览器对此宽度的解释不同(并且很难在所有浏览器中计算得出),因此可以更改此宽度.
Determines the width of the vertical scrollbar. Since different browsers interpret this width differently (and it is difficult to calculate it in all browsers) this can be changed.
这篇关于记录数少于行数-垂直滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!