Forum


02:54

30/03/2009

Hi,
Users like the column widths to be reinstated whenever they come back to their page. I read the documentation but setColProp would not have any effect on width.
As mentioned above the options in colModel can be get or set using the methods getColProp and setColProp. Below are options which can not be changed dynamically when the grid is constructed (If changed they do not have effect or will cause the grid errors). For some of these options there are methods available to change the value.
name width resizable- label (method avail.)
11:48

Moderators
30/10/2007

Hello,
This is partially true. You can set the new width of the column using two methods – setColProp and setGridWidth.
Here is example of setting new width of the column amount:
$(”#mygrid”).jqGrid('setColProp','amount',{width:new_width});
var gw = $(”#mygrid”).jqGrid('getGridParam','width');
$(”#mygrid”).jqGrid('setGridWidth',gw);
Regards
Tony
P.S. Note that in order to work this a shrinkToFit should be true, or you should call setGridWidth with second parameter true
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
59 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66