Jqgridリロードヘッダーとデータ



Jqgrid Reload Header



インターフェイス接続を設定する代わりに、独自のデータを接続できます。

$('#gridTable').jqGrid({ datatype: 'local',/ / Data source, local data data: grid_data,//grid_data is your own local data (or in memory) colModel: colModels,/ / Self-assembled header format })

ヘッダーとデータを強制的に更新します

$.ajax({})//after that $('#gbox_gridTable').remove()/ / Forced to clear the html of the grid container $('body').append('')//Add a new render container for the grid $('#gridTable').jqGrid({ datatype: 'local', data: grid_data, colModel: colModels, })// Finally execute a render function,

この方法は大雑把ですが、問題を解決することができます!



総括する

$('#gridTable').jqGrid('setGridParam', { data: grid_data, }).trigger('reloadGrid') The above method can solve the problem that the header is fixed and only the data is updated. I also tried the gridunload method first, but did not achieve the effect mentioned in the table.