开发者

minimum width for jq grid

开发者 https://www.devze.com 2023-03-06 22:14 出处:网络
is there something called min-width for jq grid? i want my grid to have a minimum width and if the data exceeds t开发者_JAVA百科he width should be auto adjusted.

is there something called min-width for jq grid? i want my grid to have a minimum width and if the data exceeds t开发者_JAVA百科he width should be auto adjusted.

thanks.

Devan


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消