Forum


09:48

23/09/2008

Hi tony,
First thanks for this great plugin!
I've two grids within one html page. For the first grid the pager is showing
fine, including the navigation buttons but for the second grid the navigation
buttons are not present (the pager is shown but the navigation buttons
are missing).
If assigned a different id for the pager of each grid and also set the pgbuttons: true,
Strange thing is if I put the second grid on the first place (in the code) the problem still exists in the second grid (meaning that I switchs the grids from position and that the problem switch also). It is always the second grid that is not showing the pager correctly (no buttons).
Regards,
Richard
16:55

29/10/2008

Hello.
Excuse my lousy english. I got a problem like this, but in my case, i can´t view the form edit popup of my second grid!!!. All the buttons are visibles.
In Firebug i can see the popup's code perfectly loaded but the DIVs and table are invisible, like transparents.
Somebody could help me?
thank you
03:21

Moderators
30/10/2007

Hello,
Check your code. If you make a copy paste there will be some errors.
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.
08:17

29/10/2008

Hello tony, thank you for responding.
I did a test with a single grid (disable the code of the first grid) and worked fine. I do not understand.
this is my code:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#list").jqGrid({
url:'wp-content/themes/default/eventos.php',
datatype: 'xml',
mtype: 'GET',
colNames:['ID','Evento', 'Fecha', 'Fotos', 'Video'],
colModel :[
{name:'id_e', index:'id_e', width:15, editable:false, editoptions:{readonly:true,size:10}, search:true},
{name:'nombre', index:'nombre', width:200, editable:true, editoptions:{size:100}},
{name:'fecha', index:'fecha', width:35, align:'left', editable:true, editoptions:{size:15}},
{name:'fotos', index:'fotos', width:20, align:'left', editable:true, editoptions:{size:3}},
{name:'video', index:'video', width:20, align:'left', editable:true, editoptions:{size:3}} ],
pager: jQuery('#pager'),
rowNum:10,
rowList:[10,20,30],
sortname: 'id_e',
sortorder: "asc",
viewrecords: true,
imgpath: 'wp-content/themes/default/themes/rojo/images',
caption: 'Eventos o Actividades Sociales',
width: 715,
loadtext: 'Cargando...',
recordtext: 'Registros',
height: '100%',
hidegrid: false,
editurl: 'wp-content/themes/default/actualizacion.php'
});
jQuery("#list").navGrid('#pager', //botonera de la tabla Eventos - WEB_0009
{add: true, edit: true, del: true},
{width:550,//Botón de Edición
height:160,
bSubmit: "Guardar",
bCancel: "Cancelar",
processData: "Procesando...",
mtype: "POST",
editData: {tabla:'eventos'}},
{width:550,//Botón de Adición
editCaption:"<b>Añadir Evento</b>",
height:160,
bSubmit: "Guardar",
bCancel: "Cancelar",
processData: "Procesando...",
mtype: "POST",
afterSubmit:function(status,aPostdata)
{ return[true]; } },
{bSubmit: "Eliminar",//Botón de Eliminación
bCancel: "Cancelar",
processData: "Procesando...",
msg: "Esta seguro de eliminar este Evento?",
caption: "<b>Eliminar Evento</b>",
mtype: "POST",
delData: {tabla:'eventos'}},
{caption: "Buscar",//Botón de Búsqueda
Find: "Buscar",
Clear: "Limpiar",
odata : ['igual', 'distinto', 'menor', 'menor o igual','mayor que','mayor o igual que', 'comienza con','termina con','contiene' ]}
);
//botonera
jQuery.jgrid.edit = {editCaption: "<b>Editar Registro</b>"};
//from here the second grid´s code
jQuery("#details").jqGrid({
url:'wp-content/themes/default/aportes.php',
datatype: 'xml',
mtype: 'GET',
colNames:['ID','Empresa', 'Orden de Compra', 'Orden de Pago', 'Monto (Bs.F.)', 'Especies', 'ID_E', 'carta'],
colModel :[
{name:'id_a', index:'id_a', width:20, editable:false, editoptions:{readonly:true,size:10}},
{name:'proveedor', index:'proveedor', width:90, editable:true, editoptions:{size:100}},
{name:'orden_compra', index:'orden_compra', width:76, align:'right', editable:true, editoptions:{size:15}},
{name:'orden_pago', index:'orden_pago', width:64, align:'right', editable:true, editoptions:{size:15}},
{name:'monto', index:'monto', width:62, align:'right', editable:true, editoptions:{size:15}},
{name:'especie', index:'especie', width:55, align:'right', editable:true, editoptions:{size:15}},
{name:'id_e', index:'id_e', width:80, align:'right', editable:true, editoptions:{size:10}},
{name:'carta', index:'carta', width:26, align:'center', sortable:false, editable:true, editoptions:{size:10}}],
pager: jQuery('#pagerdetails'),
rowNum:10,
rowList:[10,20,30],
sortname: 'id_a',
sortorder: "asc",
viewrecords: true,
imgpath: 'wp-content/themes/default/themes/rojo/images',
caption: 'Empresas que contribuyeron con el Evento',
width: 700,
loadtext: 'Cargando...',
recordtext: 'Registros',
height: '100%',
hidegrid: false,
editurl: 'wp-content/themes/default/actualizacion.php'
});
jQuery("#details").navGrid('#pagerdetails', //botonera de la tabla Contribuciones - WEB_0009
{add: true, edit: true, del: true},
{width:550,//Botón de Edición
height:225,
bSubmit: "Guardar",
bCancel: "Cancelar",
processData: "Procesando...",
mtype: "POST",
editData: {tabla:'aportes'}},
{width:550,//Botón de Adición
editCaption:"<b>Añadir Contribución</b>",
height:160,
bSubmit: "Guardar",
bCancel: "Cancelar",
processData: "Procesando...",
mtype: "POST",
afterSubmit:function(status,aPostdata)
{ return[true]; } },
{bSubmit: "Eliminar",//Botón de Eliminación
bCancel: "Cancelar",
processData: "Procesando...",
msg: "Esta seguro de eliminar esta Contribución?",
caption: "<b>Eliminar Evento</b>",
mtype: "POST",
delData: {tabla:'aportes'}},
{caption: "Buscar",//Botón de Búsqueda
Find: "Buscar",
Clear: "Limpiar",
odata : ['igual', 'distinto', 'menor', 'menor o igual','mayor que','mayor o igual que', 'comienza con','termina con','contiene' ]}
);
10:29

Moderators
30/10/2007

Hello,
If I remember there was the same problem and someone posted here the solution.
Also try to search the forum. I will serch too.
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.
06:14

Moderators
30/10/2007

Hello,
Open the css file find div.scroll and remove display:none property.
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.
05:15

29/01/2009

Hi Tony! Thanks, but it didn't work. You can test it out here: http://inweb.pt/?com=cursos.....a&t=7
It only happens on Firefox and Chrome.
All my detail grids are initially hidden. On this example, you have to click the open book icon to see the second.
I tried not hiding the second grid (commenting $(ufb).hide();), but it still didn't work.
07:01

Moderators
30/10/2007

Hello,
Check your server responce. I see
{"page":"0","total":5,"records":"42","rows"....
page is 0, but total pages are 5. This causes the pager not to apper.
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.
08:08

Moderators
30/10/2007

Hello,
In order to see what is the problem, please replace the jquery.jqgrid-min.js with non minified version - i.e jquery.jqgrid.js
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.
09:02

Moderators
30/10/2007

Check your code. If I select to view the grid - it is executed two times.
If I look in to the updatepager function the element
"#pageruf"
could not be found in order to set the pager elements
when the pager try to updates.
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.
09:25

29/01/2009

Hey Tony, I'm sorry, but I didn't understand your instructions.
I didn't understand how the grid is executed two times.
There are two grids loading, but the second one is hidden with datatype:'local', until you click the open book icon in the first grid. This will set the datatype in the second to 'json', trigger reloadGrid and jquery 'show' it. But it's always there, though.
This pager button thing happens all over my backoffice, when I have more then 1 grid in the same page, and I use multiple grids extensively. But the pager buttons only show in the first grid.
I also didn't understand how to correct what you see in the updatepager function. I have the pager set in html and in the grid:
<div id=”pager” class=”scroll” style=”text-align:center;”></div>
<div id=”griduf”>
<br />
<table id=”listuf” class=”scroll”></table>
<div id=”pageruf” class=”scroll” style=”text-align:center;”></div>
<div id=”addbutton”></div>
</div>
and
var ufb = "#griduf";
var ufp = “#pageruf”;
...
$(ufb).hide();
...
$(ufl).jqGrid({
pager: $(ufp),
datatype: 'local',
...
}); // end ufgrid
15:32

Moderators
30/10/2007

Hello,
What I try to explain is:
If I click on the book icon of the first grid the second (hidden grid) is triggred two times. This can be asy seen with firebug.
Also try the following on second grid (in order to understand what is happen)
..jqGrid({
...
datatype : "jsonstring:
datastr: ' " " ',
...
});
instead of datatype local.
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.
07:53

Moderators
30/10/2007

Hello,
Did you try my approach above. The second populating can be in the fact that in some version of FireBug this can be happen. Also IMHO you code is clean.
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.
08:50

29/01/2009

Hey!
I'm more of a PHP developer and so jQuery and FireBug are actually rather new to me (few months). I haven't had the time to learn all of what FireBug has to offer, and am continually learning more and more of jQuery.
I tried to pass in jsonstring to datatype and an empty string to datastr, but nothing happened and I didn't know how to see what was happening as you said in FireBug.
So, I still don't understand why this happens and more importantly, how to solve it.
I tried putting the entire second grid inside the onclick function that loads it (the open book icon), and use a GridUnload() when closing.
I have the same result as before.
Most Users Ever Online: 715
Currently Online:
171 Guest(s)
Currently Browsing this Page:
2 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