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
2 grids and only 1 pager works
23/09/2008
09:48
Avatar
spiderglobe
Member
Members
Forum Posts: 4
Member Since:
23/09/2008
sp_UserOfflineSmall Offline

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

23/09/2008
11:34
Avatar
spiderglobe
Member
Members
Forum Posts: 4
Member Since:
23/09/2008
sp_UserOfflineSmall Offline

Looks like a stylesheet issue. In IE its working.. Will check this out..

R.

28/10/2008
16:55
Avatar
JV
Member
Members
Forum Posts: 3
Member Since:
29/10/2008
sp_UserOfflineSmall Offline

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!!!Cry. 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

29/10/2008
03:21
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

29/10/2008
08:17
Avatar
JV
Member
Members
Forum Posts: 3
Member Since:
29/10/2008
sp_UserOfflineSmall Offline

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&ntilde;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&ntilde;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' ]}
      );

29/10/2008
10:29
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

29/10/2008
14:18
Avatar
JV
Member
Members
Forum Posts: 3
Member Since:
29/10/2008
sp_UserOfflineSmall Offline

Since long time ago I've been looking in the forum but I can not find anything about it. I don't know what to do

Please, if you find anything, copy paste the link here. I would greatly appreciate you.

23/04/2009
10:32
Avatar
helder
Member
Members
Forum Posts: 15
Member Since:
29/01/2009
sp_UserOfflineSmall Offline

I have the same problem. Tried searching the forum, but haven't found the solution.

I'm using jqGrid 3.4, with jQuery 1.3.

Thanks!

25/04/2009
06:14
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

26/04/2009
05:15
Avatar
helder
Member
Members
Forum Posts: 15
Member Since:
29/01/2009
sp_UserOfflineSmall Offline

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.

26/04/2009
07:01
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

26/04/2009
07:11
Avatar
helder
Member
Members
Forum Posts: 15
Member Since:
29/01/2009
sp_UserOfflineSmall Offline

I've just corrected that, but the icons still don't show.

28/04/2009
08:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

28/04/2009
08:37
Avatar
helder
Member
Members
Forum Posts: 15
Member Since:
29/01/2009
sp_UserOfflineSmall Offline

Hey Tony! It's done. Thanks for the help.

28/04/2009
09:02
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

28/04/2009
09:25
Avatar
helder
Member
Members
Forum Posts: 15
Member Since:
29/01/2009
sp_UserOfflineSmall Offline

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:

<table id=”list” class=”scroll”></table>
<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

29/04/2009
15:32
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

29/04/2009
18:02
Avatar
helder
Member
Members
Forum Posts: 15
Member Since:
29/01/2009
sp_UserOfflineSmall Offline

I don't know how to solve it.

When you click the icon, this is what happens:

$(ufl)
  .clearGridData()
 
.setGridParam({
     
url: "http://myurlnewurl...&task=griduf&c="+row_id
    , datatype: 'json'
    , page: 1
  })
  .setCaption('the new caption')
  .trigger('reloadGrid')

;

...

$(ufb).show(1000);

05/05/2009
07:53
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

05/05/2009
08:50
Avatar
helder
Member
Members
Forum Posts: 15
Member Since:
29/01/2009
sp_UserOfflineSmall Offline

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.


Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information