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
Setting Grid Height to a fixed value
23/12/2009
23:17
Avatar
Rushi
Member
Members
Forum Posts: 6
Member Since:
10/10/2009
sp_UserOfflineSmall Offline

Hello,

I am using a JQgrid with no paging mechanism where all the data is shown at once. I can't use the 'auto' value for the grid height because it will stretch the grid vertically too much if the number of rows are large. I need to set the grid's height to a value so it can display, lets say, 50 rows and then the rest of the rows can be seen by using the scrollbar. Please note that I need to bring all the rows to the client (rowNum: -1).

Here's my problem.

Setting the grid height to 'auto' is not possible due to the above issue. If I use a number, say 100, the grid always uses that space even though there are no rows or very few rows. Due to this, there is a lot of extra space which doesn't look nice. What I want is something like: maxHeight + auto combination. The grid should resize itself vertically but not beyond the maxHeight.

I am using the version 3.5.3.

Any ideas?

Thanks,

Rushi

26/12/2009
13:02
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Sorry do not understand. Any picture or something elese to understand better the problem

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.

28/12/2009
07:29
Avatar
Rushi
Member
Members
Forum Posts: 6
Member Since:
10/10/2009
sp_UserOfflineSmall Offline

Hi Tony,

I am not able to add any attachments to my message..The webpage that I need to show you is running locally and hence I cannot give you the URL. I tried to insert an image using the menu here but it didn't work. How do I insert pictures or add attachments to the forum messages?

Thanks,

Rushi

28/12/2009
14:57
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

28/12/2009
19:54
Avatar
Rushi
Member
Members
Forum Posts: 6
Member Since:
10/10/2009
sp_UserOfflineSmall Offline

Hi Tony,

I read the post about inserting images into the message but I didn't understand it too well. Anyways, I have uploaded the screenshots to flickr. I hope you can access them.

SingleRowImage Enlarger

EmptyImage Enlarger

Thanks a lot,

Rushi

29/12/2009
16:29
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Set the initial height to auto, and in loadComplete determine the number of records using getGridParam. If the number of records is

more than desired value set the fixedHeight here using setGridHeight.

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.

30/12/2009
02:32
Avatar
Rushi
Member
Members
Forum Posts: 6
Member Since:
10/10/2009
sp_UserOfflineSmall Offline

That worked perfect!! Thanks Tony.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
49 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