Sort not working with jqGrid

前端 未结 3 2040
梦谈多话
梦谈多话 2020-12-10 19:18

I\'ve been having problems getting jqGrid to sort. I\'d like to preferable do this sorting on the client, but I\'m also willing to make a new call to the database to get th

3条回答
  •  遥遥无期
    2020-12-10 19:47

    loadonce only works with the predefined loaders. If you use datatype as function you should set datatype:local manually after the first loading of the grid with the custom function.

    Try something like this:

    datatype : function (){
        $.ajax({
        …
        complete :function (…){
                    …
                    $("#mygrid").setGridParam({datatype:'local'});
            }
        })
    },
    

提交回复
热议问题