【问题标题】:jQgrid beforeProcessing doesn't firejQgrid beforeProcessing 不会触发
【发布时间】:2012-05-09 19:04:17
【问题描述】:

我使用的是 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);},

【问题讨论】:

  • 我从未使用过 jqGrid,但是您运行了哪个测试以确定之前的函数从未运行?
  • 在 beforeProcessing(data,status,xhr) 中有一个警告,永远不会触发

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


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-06-28
    • 2019-08-24
    • 2016-10-25
    • 1970-01-01
    • 1970-01-01
    • 2013-12-12
    • 1970-01-01
    • 2017-03-26
    相关资源
    最近更新 更多