Reputation: 170
is there something called min-width for jq grid? i want my grid to have a minimum width and if the data exceeds the width should be auto adjusted.
thanks.
Devan
Upvotes: 2
Views: 11577
Reputation: 221997
The answer on your question depends on how the grid width can be changed in your grid. If you use gridResize then you can just set the corresponding parameters like
$("#list").jqGrid('gridResize', { minWidth: 450, minHeight: 100 });
moreover you can consider to bind 'resize'
event to make the changes of grid width if the browser window or the container, where the grid are placed, will be resized. See the answer for details.
Additionally you can consider to set "min-width", "min-height" CSS settings (see here for details) if the change of the grid size will be made not with respect of gridResize. The setting works starting with IE7.
Upvotes: 4