2012-04-04 58 views
1

我在使用jqGrid和thickbox在同一页面时遇到了麻烦。我正在使用“reloadGrid”方法来刷新Array数据。使用reloadGrid时jqGrid和thickbox

的jqGrid的初始化:

jQuery("#tablaCompromisos").jqGrid({ 
     datatype: "local",    
     height: 270, 
     width: 1000, 
     colNames: ['ID', 'Nombre Reunión', 'Reunión', 'Descripción', 'Cierre', 'Estado', 'Prioridad', 'Responsable R1', 'Responsable 2', 'Categoría'], 
     cmTemplate: { 
      resizable: false 
     }, 
     colModel: [ 
        { width: 60, name: 'idCompromiso', index: 'idCompromiso', sorttype: "int", align: "center" }, 
       { width: 300, name: 'reunion.nombre', index: 'reunion.nombre', sorttype: "string" }, 
       { width: 90, name: 'fechaReunion', index: 'fechaReunion', sorttype: "string", align: 'center', formatter: 'date', formatoptions: { newformat: 'd/M/Y' }, classes: 'reuFecha' }, 
       { width: 300, name: 'descCompromiso', index: 'descCompromiso', sorttype: "string", classes: 'compDesc' }, 
       { width: 90, name: 'fechaCierre', index: 'fechaCierre', sorttype: "string", align: 'center', classes: 'fechaCierre', formatter: 'date', formatoptions: { newformat: 'd/M/Y'} }, 
       { width: 60, name: 'estado.nombre', index: 'estado.orden', sorttype: "int", align: 'center', classes: 'estado', formatter: fomatoEstado }, 
       { width: 90, name: 'prioridad.nombre', index: 'prioridad.orden', sorttype: "int", align: 'center', formatter: fomatoPrioridad, classes: 'prioridad' }, 
       { name: 'responsableR1.nombre', index: 'responsableR1.nombre', sorttype: "string", classes: 'resp1' }, 
       { name: 'responsableR2.nombre', index: 'responsableR2.nombre', sorttype: "string", classes: 'resp2' }, 
       { name: 'categoria.nombre', index: 'categoria.orden', sorttype: "string", classes: 'categoria' } 
       ], 
     multiselect: false, 
     caption: "Listado de compromisos según filtro", 
     rowNum: 11, 
     pager: "#tablaCompromisosPag", 
     autowidth: false, 
     shrinkToFit: false, 
     altRows: true 
    }); 

的更新方法:

$("#tablaCompromisos").jqGrid('clearGridData').jqGrid('setGridParam', { datatype: 'local', data: CargarDatosGrilla() }).trigger("reloadGrid"); 

这一切都OK,但点击链接后:

<a onclick="cargarGraficoAvance();return false;" title="Ver gráfico de avance" class="thickbox" href="#TB_inline?height=410&amp;width=610&amp;inlineId=wrapperGrafico">11,11</a> 

下调用

$("#tablaCompromisos").jqGrid('clearGridData').jqGrid('setGridParam', { datatype: 'local', data: CargarDatosGrilla() }).trigger("reloadGrid"); 

略知updatepager方法错误,因为TS为空:

原因:

$(window).unload(function() { 
    ts = null; 
}); 

我已经改变了方法,避免通话 “TS =空”,但还有另一种修复到那个?通过做出这种改变还有其他的影响吗?

在此先感谢

+0

我已经找到了原因和修复。 .. http://core.trac.wordpress.org/ticket/19189 – rolivares 2012-04-05 15:13:00

回答