Forum


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
12:52

Moderators
30/10/2007

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.
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
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66