jqGrid的自由设定的默认值`styleUI`,`iconSet`,`width`和`direction`
问题描述:
我们正在使用的jqGrid免费4.13.5 ...jqGrid的自由设定的默认值`styleUI`,`iconSet`,`width`和`direction`
是否可以设置默认styleUI
,iconSet
,width
和direction
?!
我想是这样的:
$.jgrid.defaults.styleUI = "bootstrap"
$.jgrid.styleUI = "bootstrap"
我有检讨http://free-jqgrid.github.io/api-documentation/index.html格,但无法找到任何答案!
答
我不确定你为什么使用styleUI
属性。应该使用guiStyle: "bootstrap"
或guiStyle: "bootstrapPrimary"
选项来指定Bootstrap GUI样式(请参阅here)。
可以通过设置$.jgrid.defaults
的相应属性来更改任何参数。因此,你可以使用
$.jgrid.defaults.guiStyle = "bootstrap";
或
$.jgrid.defaults.guiStyle = "bootstrap";
$.jgrid.defaults.iconSet = "fontAwesome";
改变的选项guiStyle: "jQueryUI"
和iconSet: "jQueryUI"
(或iconSet: "glyph"
)默认值guiStyle: "bootstrap", iconSet: "fontAwesome"
。
以同样的方式,您可以设置jqGrid的任何其他参数的默认值。例如$.jgrid.defaults.direction = "rtl";
。顺便说一下,默认的direction
将从您使用的语言环境中设置。
亲爱的@Oleg谢谢,有没有什么地方可以找到这些选项的列表。 –
在线文档http://free-jqgrid.github.io/getting-started/ – user3915432