4
votes

I need to set width of column in jQgrid Dynamically. When resize column we need to store that width in session and on loading page again we have to set that width dynamically.

1

1 Answers

0
votes

There are no method for setting of width dynamically, but one can modify the code of resizeStop which I published in the answer to create the corresponding method. In the demo the column width of subgrid will be changed based on the column width if the main grid. So the code of resizeStop callback just set width of some column of grid (subgrid in the case) to new value. It's exactly what one need for setting of width dynamically.

If you need just save the column with for the page and to use the last width choice of the user at the next loading of the same page then you can create the grid with the corresponding width of every column. Look at the demo from the answer and another one. If you change the column width of some columns and reload the page you will see the grid with last changed widths. I think it's what you can use.