jqGrid and the autowidth option. How does it work?

假如想象 提交于 2019-11-28 08:11:23

Solution: shrinkToFit: false

set

autowidth=true, shrinkToFit=false

this setting will make width of jqgrid frame equal the parent ( usually equal the width of browser ) ; and column width equal the width defined in colModel ; unfornatelly jqgrid 4.3 donot give an simple way by setting a property to auto fit/resize the column width basing on width of the content ( text in cell );

default in jqgrid :

autowidth=false, shrinkToFit=true

please see the three properties of options of jqgrid in jqgrid option wiki;

autowidth

shrinkToFit

width

and property of colModel in jqgrid colModel wiki

width

fixed

I think the priority for jqgrid frame width is *jqgrid frame autowidth > jqgrid frame width > sum of column width *

the priority for column width is colmodel fixed > jqgrid frame shrinkToFit > colmodel width

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!