Is it possible to set width of a jQGrid in percentage? If yes, then how?
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.
You can set the new width of the column using two methods – setColProp and setGridWidth. This solution works, except that I needed to use "widthOrg" instead of "width" in the call to 'setColProp'.
Free jqGrid is a JavaScript plugin that displays table-based data in a lot of different configurations. The data can be loaded from JavaScript array or be loaded from the server (in JSON or XML format). It supports client-side paging, sorting and filtering on server-side.
Just set opacity:0 for jqgrid element. it will work also.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With