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=‘,
         datatype: ‘json’,
         colNames: ,
         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=‘+’&srv=’+ document.getElementById(“pnumservicio”).value,
           url:’jsonnumservfijo.php?nd=’+new Date().getTime()+’&txtuser=‘+’&srv=’+ ‘‘+’&anio=’+’‘+’&mes=’+’‘,
         datatype: ‘json’,
         colNames: ,
         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;
               //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});
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top