Thanks for the reply. I tried your code, but it makes my grid as wide as the sum of the columns, but I want the opposite, i want the grid width to stay the same, but each column should stretch to “fill” the grid.
I'm not very familiar with jQuery, so I tried out some things in regular Javascript:
I tried that, and because the width of my grid has to stay the same, I just have to get the gridWidth and then set it again, but with shrinkToFit=true:
var gridWidth = $('#mailinfoGrid').getGridParam(“width”); $('#mailinfoGrid').setGridWidth(gridWidth,true);
But this doesn't stretch the columns š it does nothing! It's really weird, but I think it's because shrinkToFit is initially set to false on construction of my jqgrid
I tried something else, the only difference is that I get the old grid width and I set the new grid width to the old value -1. This does stretch the columns. I think because I set the width to the same width it had before, the columns didn't stretch. Weird, but it works now!
var gridWidth = $('#mailinfoGrid').getGridParam(“width”); $('#mailinfoGrid').setGridWidth(gridWidth-1,true);