Reputation: 45613
We are using jqGrid free 4.13.5 ...
Is it possible to set the default styleUI
, iconSet
, width
and direction
?!
I tried something like:
$.jgrid.defaults.styleUI = "bootstrap"
$.jgrid.styleUI = "bootstrap"
I have review the http://free-jqgrid.github.io/api-documentation/index.html grid but could not find any answer !
Upvotes: 1
Views: 1364
Reputation: 222017
I'm not sure why you use styleUI
property. One should use guiStyle: "bootstrap"
or guiStyle: "bootstrapPrimary"
option to specify the Bootstrap GUI Style (see here).
One can change any parameter by setting the corresponding property of $.jgrid.defaults
. Thus you can use
$.jgrid.defaults.guiStyle = "bootstrap";
or
$.jgrid.defaults.guiStyle = "bootstrap";
$.jgrid.defaults.iconSet = "fontAwesome";
to change default values of the options guiStyle: "jQueryUI"
and iconSet: "jQueryUI"
(or iconSet: "glyph"
) to guiStyle: "bootstrap", iconSet: "fontAwesome"
.
In the same way you can set default value of any other parameter of jqGrid. For example $.jgrid.defaults.direction = "rtl";
. By the way the default direction
will be set from the locale, which you use.
Upvotes: 2