i want change grid columns labels, have not names. there way change lable through column position or through jsonmap? other way?
thanks in advance.
the answer tpeczek based on documentation of jqgrid, it's not more correct. after changes in code 1 can't use more column position parameter of setlabel method (see the source code). have provide name of column. if have position can colmodel
, name
property of corresponding element of array colmodel
:
var ipos = 3, // position of column $grid = $("#gridid"), colmodel = $grid.jqgrid("getgridparam", "colmodel"); $grid.jqgrid("setlabel", colmodel[ipos].name, "new label");
i recommend additionally read the answer provide code allows set labels in json input of grid. the demo demonstrate approach.
Comments
Post a Comment