Forum


21:59

14/08/2009

Hi Tony
I have a problem to jump to the next page.
My "url" in the Grid is
"url:"seteos.ashx?accion=leerJSON&campo=descr_campo_1&valorCampo=''&cantidadRegistros=" + nroRenglones + "&pagina=" + paginaActual + "&totalRegistros=" + totalRegistros"
paginaActual = 1 and in server i read "pagina=1" and return
{page:"1",total:"2",records:"18",rows:[{id:"59", cell:["59","Acoyte 25 - 4 K","Capital","1405","","4902-1925",'']},{id:"62", cell:["62","Arieta 2205","San Justo","1254","","",'']},{id:"61", cell:["61","Arieta 2353","San Justo","1725","","4653-3234",'']},{id:"63", cell:["63","Av. Independencia 2353","Capital","","","4322-4255",'']},{id:"65", cell:["65","Av. La Plata 234","Capital","1424","","",'']},{id:"64", cell:["64","Av. Rivadavia 4995 - Local 25","Capital","1405","","4902-1882",'']},{id:"60", cell:["60","Camargo 774","Capital","Capital","","4854-6123",'']},{id:"45", cell:["45","Corrientes 5525 - 6 '43'","Capital","1414","","",'']},{id:"57", cell:["57","J. B. Justo 1235","Capital","1414","","4854-5323",'']},{id:"56", cell:["56","l. de la torre 1234","Lomas del Mirador","","Bs. As.","4436-4600//312*5555",'']}]}
this is my first page and it's ok.
but, when I touch the button next, my code is this
onPaging: function(que) {
switch(que) {
case "next":
if (paginaActual < cantidadPaginas) {
paginaActual += 1;
$("#Grilla").setGridParam({postData: { pagina: 2 }});
}
break;
case "prev":
break;
case "first":
break;
case "last":
break;
}
$("#Grilla").trigger("reloadGrid");
}
}).navGrid('#pagerGrilla',{view:false,edit:false,add:false,del:false,search:false, refresh:false});
When i read in server the variable pagina receive "1,2" instead of receiving "2".
Since I do to receive 2 in the server?
Thanks in advance
Victor
Victor - Regards from Buenos Aires
06:25

Moderators
30/10/2007

Hello,
Remove pagina=” + paginaActual from url and do
..jqGrid({
....
postData:{pagina:paginaActual},
...
});
Also you do not need to trigger the grid. It is done automatically after this event ends.
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.
Most Users Ever Online: 715
Currently Online:
51 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