Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
autowidth bug?
22/06/2009
13:05
Avatar
Jim P
Member
Members
Forum Posts: 102
Member Since:
29/01/2009
sp_UserOfflineSmall Offline

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

23/06/2009
03:14
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

09/07/2009
08:41
Avatar
Jim P
Member
Members
Forum Posts: 102
Member Since:
29/01/2009
sp_UserOfflineSmall Offline

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

10/07/2009
07:39
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

13/07/2009
15:14
Avatar
Jim P
Member
Members
Forum Posts: 102
Member Since:
29/01/2009
sp_UserOfflineSmall Offline

Ok Tony,

I change the loadcomplete to gridcomplete and the behavoir is still the same.  The first grid on the page is fine and the reat have the white space.

On the lower grids you can see the grid briefly fill the space and then snap to the shrunken version.

Jim

14/07/2009
12:32
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

14/07/2009
14:43
Avatar
Jim P
Member
Members
Forum Posts: 102
Member Since:
29/01/2009
sp_UserOfflineSmall Offline

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

17/07/2009
13:59
Avatar
Jim P
Member
Members
Forum Posts: 102
Member Since:
29/01/2009
sp_UserOfflineSmall Offline

Tony,

I got the new build installed and I still have the same problem.  I went the V3.5 examples and I didn't find the autowidth example there.   Did you remove that example?

I remember there was one because I noticed that you had column widths declared.  I hope it was just an oversite.

Thanks,

Jim

20/07/2009
11:23
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information