Forum
23:43
20/08/2014
Hello, my problem is, that i have two grids in one page, each grid is loaded in diferents TABS, for the tabs i use the spry TabbedPanels of dreamweaver.
1. grid_servicios
2. grid_registros
The grid number 1, have two frozen columns, and when it loads first, there's no problem, but when it load first the grid number 2, and then the grid number 1, the frozen column doesnt work at all, and thats what i need, first that load the grid number2 and then load the grid number 1, thanks for your help, here is the code for the two diferents grids
GRID 1
jQuery('#grid_servicios').jqGrid({
           url:'jsondetalleservicios.php?txtuser=<?php echo $_SESSION['cedula'];?>',
         datatype: 'json',
         colNames: ['Cédula','Suscripción<br>Contrato','Teléfono<br>Producto','Teléfono<br>Anterior','Celular<br>Asignado','Saldo<br>Pendiente','Cuentas<br>con Saldo','Tipo','Plan<br>Facturación','Saldo<br>Contrato','Ciclo','Provincia','Ciudad','Fecha<br>Instalación'],
         colModel: [
            {name:'Cedula',index:'Cedula', width:80,align:"center",sortable:false,frozen:true},//
            //{name:'Nombre',index:'Nombre', width:200,align:"center",sortable:false,frozen:true},
            {name:'Suscripcion',index:'Suscripcion', width:150, sortable:false,align:"left",frozen:true},           Â
            {name:'Telefono',index:'Telefono', width:100, sortable:false,align:"center",frozen:true},
            {name:'Telefono_Anterior',index:'Telefono_Anterior', width:80, sortable:false,align:"right"},           Â
            {name:'Celular_Asignado',index:'Celular_Asignado', width:80, sortable:false,align:"right"},
            {name:'Saldo_Pendiente',index:'Saldo_Pendiente', width:100, sortable:false,align:"right"},
            {name:'Cuentas_Saldo',index:'Cuentas_Saldo', width:100, sortable:false,align:"right"},
            {name:'Tipo',index:'Tipo', width:120, sortable:false,align:"right"},
            {name:'Plan_Facturacion',index:'Plan_Facturacion', width:150, sortable:false,align:"left"},
            {name:'Saldo_Contrato',index:'Saldo_Contrato', width:80, sortable:false,align:"right"},
            {name:'Ciclo',index:'Ciclo', width:80, sortable:false,align:"right"},
            {name:'Provincia',index:'Provincia', width:100, sortable:false,align:"right"},
            {name:'Ciudad',index:'Ciudad', width:120, sortable:false,align:"right"},
            {name:'Fecha_Instalacion',index:'Fecha_Instalacion', width:120, sortable:false,align:"right"},                                               Â
         ],
         rowNum:10,
         width:900,
         rowList:[10,20,30],
         pager: '#grid_servicios_pag',
         //sortname: 'Telefono',
         pgtext : "Página {0} de {1}",
         viewrecords: true,
         sortorder: "desc",
         //jsonReader: { repeatitems : false },
         shrinkToFit: false,
         rownumbers: true,
         caption: "Detalle de Servicios",
         height: 'auto'
GRID 2
jQuery('#grid_registros').jqGrid({
         //url: 'jsonnumserv.php?nd='+new Date().getTime()+'&txtuser=<?php //echo $_SESSION['numserv'];?>'+'&srv='+ document.getElementById("pnumservicio").value,
           url:'jsonnumservfijo.php?nd='+new Date().getTime()+'&txtuser=<?php echo $_SESSION['cedula'];?>'+'&srv='+ '<?php if (isset($_POST['pnumservicio'])) echo $_POST['pnumservicio']; ?>'+'&anio='+'<?php if (isset($_POST['panio'])) echo $_POST['panio']; ?>'+'&mes='+'<?php if (isset($_POST['pmes'])) echo $_POST['pmes']; ?>',
         datatype: 'json',
         colNames: ['Visualiza <br>tu duplicado <br>de factura','Descarga <br>tu factura <br>electrónica','Número de <br>Servicio','Número de <br>Factura','A\u00f1o','Mes','Valor','Fecha'],
         colModel: [
            {name:'Visualizar',index:'Visualizar', width:100, sortable:false,align:"center"},
            {name:'Descargar',index:'Descargar', width:100, sortable:false,align:"center" },
            {name:'Servicio',index:'Servicio', width:100, sortable:false,align:"center"},
            {name:'Factura',index:'Factura', width:200, sortable:false,align:"center"},
            {name:'Anio',index:'Anio', width:50, sortable:false,align:"right"},
            {name:'Mes',index:'Mes', width:50, sortable:false,align:"right"},
            {name:'Valor_Total',index:'Valor_Total', width:80, sortable:false,align:"right"},
            {name:'Fecha',index:'Fecha', width:120, sortable:false,align:"right"}
         ],
         pager: jQuery('#grid_paginador'),
         rowNum: 10,
         height: '100%',
         //autowidth: true,
         rowList: [10,20,30],
         //imgpath: imagenpath,
         sortname: 'Factura',
         mtype: "POST",
         recordtext: 'Facturas {0} - {1}',
         emptyrecords: 'No existen registros',
         pgtext : "Página {0} de {1}",        Â
         loadtext: "Cargando...",  Â
         multiselect : true,                 Â
         hidegrid:false,
         viewrecords: true,
         sortorder: 'asc',
         caption: 'Factura Servicios Fijos',
         //loadComplete : function(xhr){alert('loadComplete triggered')},
         gridComplete: function()
         {
            var ids = jQuery("#grid_registros").jqGrid('getDataIDs');
            //alert(ids);
            for(var i=0;i < ids.length;i++)
            {
               var cl = ids[i];
               //alert(cl);
               var chk = 'jqg_grid_registros_' + cl;
               //alert(chk);
               document.getElementById(chk).title = 'Marca la factura que deseas descargar'              Â
            }
         },
         loadError : function(xhr,st,err)
         {
            var error_msg = xhr.responseText;      Â
            var msg = "Some errors occurred during processing:";
            msg += '
' + error_msg;
            alert(msg);
            //jQuery("#rsperror").html("Type: "+st+"; Response: "+ xhr.status + " "+xhr.statusText);
         }//,
      }).navGrid('#grid_paginador',{add:false,edit:false,del:false,search:false,refresh:true});
Most Users Ever Online: 715
Currently Online:
38 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