Hello!
I've detected a strange problem when I want to reload saved grid settings and resize my grid using the available space in the browser window.
What I do is:
1) load saved/cached colModel (with the width property for all columns) – as done in step (5)
2) create the grid with that loaded colModel settings
3) calculate the available space for the grid (minus some borders or other elements in the page)
4) set the new height and width with the methods jqGrid('setGridWidth', newWidth, true) and jqGrid('setGridHeight, newHeight)
5) save colModel settings for later use (when window/view is totally reloaded) – by means of using the jqGrid('getGridParam') method
6) unload grid when view is changed/destroyed
What I get is:
* the grid is resized to the new size (that's OK),
* and if I use the “shrink=true” option, the columns get shrinked to the new proportional size (also OK)
* BUT the strange thing is, that the last column in my table is growing with every of these resize iterations by about 20 px (size of scrollbar)
It looks like the grid is scaled to the new width using the total space, shrink all columns except the last one and then another resize steps shrinks all again to display the vertical scroll bar (because there are more rows in the grid then space available).
Another possible problem I could imagine is that it has to do with the reloading and saving of the colModel. Maybe the getGridParam-method does return wrong values for the last column inside the colModel (incl. or excl. the scrollbar width).
Maybe you have any tips where I could look for the problem, or you could find any problem regarding the width of the last column.
Kind regards,
Klaus.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top