0

jqGrid offers a bunch of fantastic features, but there is one feature missing that my customer keeps on complaining about (OK, he is never really satisfied with what he gets ) and that's proper vertical and horizontal scrolling. The grid I had to set up contains about 20 columns with some columns containing longer text so the grid won't even fit a 24″ screen. To properly layout the grid and the rest of the visual components (i.e. additional search and filter functions above the grid) I moved the grid to a scrolling div being about 95% of the screen width with a horizontal scrollbar to scroll the oversized grid, the problem with that workaround is that you won't see the vertical scrollbar of the grid itself, it only becomes visible if you first scroll to the right and that's not really comfortable. Hope my explanation is comprehendible? If someone knows a good workaround, I would be eager to know it! Otherwise a "dual scrolling grid" would be a nice feature in 4.5 Thanks a lot!

Video example http://screencast.com/t/gPdOVPQlRc

Srihari Goud
  • 824
  • 10
  • 25

1 Answers1

1

jqGrid have many many options. It could be a problem with usage of jqGrid. The grid with many columns could be displayed in different ways.

One way is just to display full grid on the page and to use scrollbars of the browser windows. If you have simple page layout then the way could be really the best.

Another way could be to use shrinkToFit: false option. In the case you should specify the exact width values for columns in colModel. If you use shrinkToFit: false option you can set width option of jqGrid. In the case horizontal scrollbars will be placed in jqGrid.

In many cases the grid with many columns contains not always really interesting information for every user. So it can be helpful if you would provide columnCooser in the grid. Additionally you can save the users preferences in localStorage (see the answer and another one). It could improve user experience.

You don't wrote about the height of the grid, but the usage of height: "auto" produced typically good results.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798
  • No, height is 580px. It is fixed and should be. I try it with shrinkToFit: false. I let you know if any problem. thanks – Srihari Goud May 17 '13 at 09:22
  • No value (`height: "auto"` or `height: 580`) could be perfect for *all grids*. I wrote about `height: "auto"` because the usage of `height` (especially `"auto"` or `"100%"` value) can influence existence of scroll bars too. – Oleg May 17 '13 at 09:26
  • Just now i tried by giving `width:900, shrinkToFit : false,`. Then two horizontal scroll bar appearing. – Srihari Goud May 17 '13 at 09:44
  • @SrihariGoud: I don't understand what you mean. Do you remove your old construct with outer div having width `95%` ? – Oleg May 17 '13 at 09:45
  • I did a lot with your idea. – Srihari Goud May 17 '13 at 11:46