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_Related Related Topics sp_TopicIcon
Problems with getting a scroll bar when resizing
12/05/2010
23:17
Avatar
ddevore
New Member
Members
Forum Posts: 2
Member Since:
12/05/2010
sp_UserOfflineSmall Offline

I have an application that I am moving to using the grid with and have come into a problem. When in the application I set the width of the client to 100% and all goes well besides when resizing. The table wants to be around 1000 px wide if not restricted, which is basically what I want. But, when I resize the browser to a size smaller than the table the table is hidden with no browser horizontal scroll. I need either the browsers scroll to appear or the table to resized smaller, preferrably for the table to resized smaller. What I would like to have is the table to resize with the window size respecting the min-width, width: 100%, or the tables set preferred width.

What I have tried.

1. autowidth does not appear to work as it wants to start the table at 461px instead of the 100% as defined by the parent. To fix another problem I found I put in a min-width in the parent which forced the table to the min-width which is better but I want the table to start at the larger window size, preferrably 100% of the window.

2. shrinkToFix works for what it is designed to do but it doesn't solve my problem of getting the table to resize as described above.

3. I also tried many different parent div/table sizes and nothing I have tried appears to work.

The problem is that this table has a lot of information in it and my users want to utilize the whole screen instead of needing to drill down to another screen or scroll the table to see the right side information since the screen is large enough to contain it all.

If there is anything you need to diagnose the situation please let me know.

Thanks

Dru

12/05/2010
23:55
Avatar
ddevore
New Member
Members
Forum Posts: 2
Member Since:
12/05/2010
sp_UserOfflineSmall Offline

I found something else that might be of interest. If the grid is resizable and you resize the grid then resize the browser to a size smaller than the grid you will not get any horizontal scroll bar on the browser. Is this because of the javascript executing and the browser not knowing about the change in the size? If so is there a way to fix this so it works as a user would expect?

17/05/2010
20:13
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

1. It all depends on when you cal the construction of the grid.

If your parent initially is hidden, then the parent has a width = 0, so in this case jqGrid will have the width = sum of the width of the columns. If you show first the parent and then create the grid you will have what you want. This problem appear when you use initially hidden tabs.

If this is the case you will find a tons of solutions here.

If you want to resize the grid when the browser window resize you can find a lot information in this forum, but you can try this:

$(window).resize( function() {
    setTimeout(function() {
       $("#JQGrid1″).setGridWidth($(window).innerWidth()-10);
    }, 200);
});

Best 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:
58 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