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
conditionally suppressing parts of pager
17/06/2010
20:44
Avatar
Reg
Calgary, Canada
Member
Members
Forum Posts: 92
Member Since:
06/06/2008
sp_UserOfflineSmall Offline

When using ver 3.4, I included the following code to dynamically hide or show the page selector controls depending on whether or not there is more than 1 page:

       if(jQuery("#tblcontents").getGridParam("records") > jQuery("#tblcontents").getGridParam("rowNum")){
            jQuery("#tblcontentsPager").find("#first, #prev, input.selbox, #sp_1, #sp_2, #next, #last").show();
          }else{
            jQuery("#tblcontentsPager").find("#first, #prev, input.selbox, #sp_1, #sp_2, #next, #last").hide();
          };

In ver 3.7, I think, some of the controls have changed names. I have tried to figure this out by reading grid.base.js but interpreting javascript is not something I do well.

Can anyone tell me the names of these controls?

Is there a better way (in ver 3.7) to do what I want to do? The number of records to be returned depends on a setting on the web page, not available at the time that I define the jqGrid so it would still have to be dynamically set.

Thanks

Reg 

18/06/2010
01:43
Avatar
michaelg
Member
Members
Forum Posts: 51
Member Since:
10/04/2010
sp_UserOfflineSmall Offline

Hi Reg,

I can't answer your question because I don't use 3.7 yet, but I would suggest to use Firefox and use the Firebug plugin if you need to find out the names of elements.

Its extreemly useful for debugging javascript problems etc. as well.

I hope that helps

Cheers,

Michael

18/06/2010
02:29
Avatar
Reg
Calgary, Canada
Member
Members
Forum Posts: 92
Member Since:
06/06/2008
sp_UserOfflineSmall Offline

Thank you Michael, that helps.

Using FireFox shows that these elements do not have an id assigned, unlike prev, next, last, etc. I am going to try to hide the entire <td> which does have an id

Thanks,

Reg

18/06/2010
17:24
Avatar
Reg
Calgary, Canada
Member
Members
Forum Posts: 92
Member Since:
06/06/2008
sp_UserOfflineSmall Offline

Well, the simple solution of applying .show() and .hide() to a td apparently doesn't work, so I still cannot make this work the way I would like.

Tony, is there any way that you could add IDs to the elements in this area?

Thanks

Reg

20/06/2010
12:52
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Yes a lot of thing are changed. The first, prev, next last just exixsts.

If you just want to disable all the pager stuff:

If your pager buttons are in the center then you can jus

$("#pager_center", "#pager").hide() // or show()

Where "pager" is the id of the pager

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.

02/07/2010
19:18
Avatar
Reg
Calgary, Canada
Member
Members
Forum Posts: 92
Member Since:
06/06/2008
sp_UserOfflineSmall Offline

Hello Tony,

Yes, showing or hiding the center <td >  works, but it isn't fine enough for what I want.

What I like to do is always show the rowNum dropdown (so an operator can change the number of rows to show) but show the paging controls only when there is more than one page. Unfortunately, these are all in the center < td > so it is all of them or none of them.

To accomplish what I want to be able to do, either the rowNum dropdown has to be in a separate < td > or each element of the paging controls has to have a unique id. Personally, I think the easiest (and most flexible) approach is to give every element its own ID.

Can I ask that this be put on the list of enhancements for the next release, please?

Thanks,

Reg

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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