Forum


Tony,
I have some columns in the column model set initially to hide dynamically with the loadComplete fuction.
loadComplete:function(){
// Hide the site name column per user settings
var hidesite = <cfoutput>#session.myGridOC_Site_Name#</cfoutput>;
if(hidesite == 0){
$("#slist").hideCol("x_site_name");
}
// Hide the Account Name column per user settings
var hideacctname = <cfoutput>#session.myGridOC_Acct_Name#</cfoutput>;
if(hideacctname == 0){
$("#slist").hideCol("name");
}
....... more columns like above.
Under 3.5 I get a big chunk of empty column space on the right side of the grid. With autowidth set to "true", I would expect the grid to fill the entire grid. It doesn't. Is this a bug?
Jim
03:14

Moderators
30/10/2007

Hello,
This is not a bug, but a way that autowidth works. This option resize the initially grid to the width of the parent element.
In your case you hide some columns after the grid is setted.
Also you can use the following trick
loadComplete:function(){
var gw = parseInt($("#mygrid").getGridParam("width"));
// do here hide of columns
// at end
$("#mygrid").setGridWidth(gw-0.01,true);
}
Regards
Tony
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.
Tony,
Your fix:
loadComplete:function(){
var gw = parseInt($("#mygrid").getGridParam("width"));
// hide some columns code here
$(”#mygrid”).setGridWidth(gw-0.01,true);
}
Worked great, except if there are multiple grids on a page. From the 2nd grid on the grid still have the block of white space where the columns are not resizing. For each grid I changed the var name: gw, sgw, pgw.
Do you have any ideal why this is happening? and of course a fix.
Thanks,
Jim
07:39

Moderators
30/10/2007

Hello,
Use gridComplete and not loadComplete
Regards
Tony
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.
12:32

Moderators
30/10/2007

Hello,
There was a bug in setGridWidth when a multiple grids are resized. Use the latest build.
Regards
Tony
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.
Tony,
Is there another source to download the files. When I try to download files from Githup http://github.com/tonytomov/jq.....ree/master
I get a page error and don't start a download session.
Thanks,
Jim
11:23

Moderators
30/10/2007

Hello,
I'm sure that this bug is corrected
http://github.com/tonytomov/jq.....7ea5b76700
Try to clear your cache.
Regards
Tony
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:
75 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