In my jqGrid I use the multiselect parameter so that there is a checkbox on each row. The grid shows a list where each row has an \"Open\" status. A number of rows may be ch
It seems to me that the reason of your problem is in the usage of setGridParam
. The method should be worked only if you change parameters, which are not arrays. Your current code merges old data
with new one (see the main line of code of setGridParam
, which calls deep version of $.extend). In case of arrays you should use the second (overwrite
) parameter of setGridParam
:
var reloadGridWithUpdatedData = function (data) {
var grid = $("#grid");
grid.jqGrid("setGridParam", { data: data }, true);
grid.trigger("reloadGrid");
}
or just don't use setGridParam
at all. The method getGridParam
gives the reference to internal object, which holds all parameters. It allows to replace (overwrite) any parameter in very simple way:
var reloadGridWithUpdatedData = function (data) {
var grid = $("#grid"),
p = grid.jqGrid("getGridParam"); // get reference to all parameters
p.data = data; // replace data parameter
grid.trigger("reloadGrid");
}