jqGrid Refreshing Local Data (JSON Object)

前端 未结 6 1723
走了就别回头了
走了就别回头了 2021-01-31 18:44

I\'m trying to use jqGrid with local data and I\'m finding a couple of issues:

I\'m initializing the thing like so:

function refreshGrid($grid, results)
         


        
6条回答
  •  离开以前
    2021-01-31 19:07

    If you are using Local data, you should mention your Local json Data in jqGrid's setGridParam property

     jQuery("#list")
            .jqGrid('setGridParam', {
            datatype: 'local',
            data:results //json object
        });
    

    To reload the jqgrid you can use the following.

     jQuery("#list").trigger("reloadGrid");
    

提交回复
热议问题