jQgrid beforeProcessing不会触发

时间:2012-05-09 19:04:17

标签: jquery jqgrid jqgrid-asp.net jqgrid-php jqgrid-formatter

我正在使用jqGrid 4.0.0,beforeProcessing永远不会被每个postBack触发,它根本没有触发,请协助!

$('#jqgInventory').jqGrid({
    autowidth: true,
    caption: 'Inventory',
    datatype:'json',
    forceFit: true,
    gridview: true,
    height: 500,
    hidegrid: false,
    ignoreCase: true,
    loadui: 'disable',
    pager:'#pager',
    mtype: 'post',
    rowNum:25,
    shrinkToFit: true,
    url:'/MCI/Inventory/Inventory/GetIndexGridData',
    viewrecords: true,
    postData: { modelView: JSON.stringify(model), __RequestVerificationToken:   $('[name="__RequestVerificationToken"]').val() },
    beforeProcessing:  function(data, status,xhr){beforeProcessing(data,status,xhr)},
    beforeRequest: function() {$('#gridScript').block();},
    beforeSelectRow: function(rowid, e) {return false;},
    gridComplete: function() {$('#lblVehicleCount').html($('#jqgInventory').getGridParam('records'));$('#gridScript').unblock();Inventory.modifyGridCellClick();},
    loadComplete: function(xhr) {GetGridData(xhr);},

1 个答案:

答案 0 :(得分:3)

如果你想使用jqGrid的新功能,你应该使用最新版本的jqGrid。您可以从here下载。

回调函数beforeProcessing将不会在jqGrid 4.0.0中调用,因为它是在4.2.0版本中引入的。