0

我正在做一些测试,我想在 loadlComplete 中移动到另一个,但网格不会重新加载。

如果我在 firebug 上执行此语句,则网格重新加载: jQuery("#participations").jqGrid('setGridParam',{page:2}).trigger("reloadGrid");

为什么这在 loadcomplete 上不起作用?

         jQuery("#participations").jqGrid({url:'bd/getParticipations_pageable.php',
        datatype: "json",
        postData:{contestId:contestId},
        width:920,
        height: "auto",
        scrollOffset:0,
        colNames:['','Participação', 'Email','Nome','Telemóvel'],
        colModel:[
             {name:'id',index:'id', width:210, sorttype:'int', hidden:false, sortable:false},
             {name:'participation',index:'participation',sortable:false},
             {name:'email',index:'email',width:35,sortable:false},
             {name:'name',index:'name',width:35,sortable:false},
             {name:'moreInfoBtn',index:'moreInfoBtn', width:43,sortable:false}

            ],
        rowNum:15,
        hidegrid: false,
        pager: '#participationsPager',
        sortname: 'id', 
        sortorder: "desc",
        caption:"Participações",
            gridComplete: function(){


             var ids = jQuery("#participations").jqGrid('getDataIDs');
             var rows = jQuery("#participations").jqGrid('getRowData');

             var mydata = $("#participations").jqGrid('getGridParam','data');
            jQuery("#participations").jqGrid('setGridParam',{page:2}).trigger("reloadGrid");


        }
        ,loadComplete:function(){




        },
}).navGrid("#participationsPager",{edit:false,add:false,del:false,search:false});
4

0 回答 0