I am new in jqgrid and I would like to increase the width of jqgrid. I have increased the column width but the grid width is not increasing. I am using php jqgrid.
Is there any parameters to pass this function :=
$grid->renderGrid('#grid','#pager',true, null, null, true,true);
or How can i do this ?
Thanks a lot.
You can use below php code:
I had same issue, my grid was taking 650px by default with. So, I check some blog and also wiki and now is ended up with :)
Here is my complete php code with auto grid width:
You question is mostly about the commercial version of jqGrid, which I don't know. The main problem exist also in the jqGrid too. jqGrid has width parameter which can be used to define the grid width. I suppose that you should use (or already use)
$grid->setGridOptions
to define the option. Another option which can be additionally used areautowidth
which will be overwrite thewidth
value calculated based on the size of the grid's parent. Other important option can be important you:shrinkToFit
which default value istrue
. It meant that thewidth
properties for the column will be not used as the exact column width in pixel. Instead of that thewidth
properties will be used to define only proportion between the column widths. If the column width of some column should be not changed you should includefixed: true
property in thecolModel
for the corresponding definition of the column. If you want to have exact column width for all columns (as it's defined inwidth
properties of the items of thecolModel
) you should use the jqGrid settingshrinkToFit: false
. Try to include the setting in the$grid->setGridOptions
call.