Is it possible to set width of a jQGrid in percentage?

Amit picture Amit · May 12, 2012 · Viewed 37.5k times · Source

Is it possible to set width of a jQGrid in percentage? If yes, then how?

Answer

DisplayName picture DisplayName · May 13, 2012

Not directly but it is possible...

If you are wanting to set the width of the entire grid to a percentage you can use the autowidth property and it will set the grids width to the width of it's parent element (i.e. DIV) and that parent element can have it's percentage set.

autowidth: true

If you want to set the column widths by percentage you can use shrinktofit and then your column width values are basically a percentage.

shrinkToFit: true

These options and many others can be found on the JQGrid wiki