tonytomov / jqGrid

jQuery grid plugin
www.trirand.com
2.84k stars 1.2k forks source link

Problem with non-shrinkToFit grids and filter-bars #950

Closed unle70 closed 4 years ago

unle70 commented 5 years ago

There's a slightly annoying problem when creating a grid without shrinkToFit. In this case the column structure can be larger than the actual window width, so a horizontal scroll-bar appears at the bottom of the grid, allowing to scroll and view the "hidden" fields on the right.

This is working very well, but the scroll bar is visible only when the grid is populated with data. If there are no records to be displayed in the gird, the scroll-bar is hidden.

Now imagine that you use the filter-bar to set some search criteria. You retrieve too many records and want to further filter. Then you go to a column at the END of the grid (far right) by using the scroll-bar and add a criteria at the filter-bar of that column. Now maybe this added criteria causes NO records to be retrieved (criteria is too tight) and you want to modify the filter-bar content on the far-right column, but since the scroll-bar is now hidden, you cannot move to the hidden column in order to change it.

The only idea I have on how to solve this is maybe to add a dummy record in case the grid is empty. This dummy record might say something like "No records retrieved!". Then the scroll-bar would be visible and all the columns would be accessible.

tonytomov commented 4 years ago

Hello,

I have fixed the problem following your recommendations. Please let me know if this is fixed for you too.

unle70 commented 4 years ago

Hi Tony,

Perfect! Solved the problem for me.