jqGrid loadonce doesn't work with asp.net

后端 未结 4 833
死守一世寂寞
死守一世寂寞 2021-01-03 13:29

Does anyone know how to solve this nasty issue with asp.net+asmx+jqGrid sorting. Because, in order to call pagemethods or asmx web services from jqGrid, it needs to be hacke

4条回答
  •  误落风尘
    2021-01-03 14:21

    For those to whom @Groxx's solution didn't work (when I tried it the content of my grid dissapeared every time I tried to sort a column), try the solution from this thread. It worked for me. I'm using jqGrid 4.5.4.

    First, set loadonce : true in your grid's settings. As explained here, this changes the datatype parameters to 'local' after the grids finishes loading for the first time. Then, when you want to reload the grid, change datatype back to json:

    $('#your-grid').setGridParam({ datatype : 'json' }).trigger('reloadGrid');
    

    If you are using navGrid you may want to review your add, edit and delete options to force your grid to reload like indicated in this answer.

提交回复
热议问题