Bertaud
Bertaud

Reputation: 2918

Number of records inferior to the number of rows - vertical scrollbar

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!

Upvotes: 2

Views: 608

Answers (1)

Justin Ethier
Justin Ethier

Reputation: 134197

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.

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

integer

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.

Upvotes: 3

Related Questions