I completely agree with Justin that jqGrid does not support the dynamic inclusion of the multiselect parameter. So +1 to his answer anyway. I agree that the simplest and only supported way to switch the multiselect parameter will be to re-initialize (recreate) the grid.
So, if you need to change the multiselect jqGrid parameter multiselect , you need to first change the multiselect parameter with respect to setGridParam , and then re-create the grid with respect to GridUnload . See demo from.
However, I find your question very interesting (+1 for you too). It is a small sporting task, at least to try to realize the behavior.
Some notes for understanding the complexity of the problem. When filling the body of the grid, the jqGrid code calculates the positions of the cells based on the value of the multiselect parameter (see the gi parameter value here and later to use here ). Therefore, if you hide the "cb" column in which the checkboxes are set, the cell position will not be calculated correctly. The grid will be filled correctly only if the "cb" column does not exist at all or you have multiselect: true . Thus, you must set multiselect: true before searching or sorting the grid if the "cb" column exists in the grid. Even for the hidden cb column, you need to set multiselect to true . On the other hand, you must set the multiselect value corresponding to the actual behavior that you need immediately after filling the grid (for example, in loadComplete ).
I hope I express my clear impression of my poor English. To be sure that everyone will understand me correctly, I repeat the same thing again. If you want to try dynamically switching multiselect , you need to do the following:
- create a grid in any way with
multiselect: true to have a column "cb" - set
multiselect: false and hide the "cb" column in loadComplete if you want to have one select action - set
multiselect: true always before updating the grid: before searching, sorting, filtering, reloading, etc.
I created a demo that seems to work. It has a button that can be used to switch the multiselect parameter:

In the demo, I used a trick with a subclass (rewriting the original event descriptor) of the reloadGrid event, which I described the old answer .
You will find the most important parts of the code from the demo below:
var events, originalReloadGrid, $grid = $("#list"), multiselect = false, enableMultiselect = function (isEnable) { $(this).jqGrid('setGridParam', {multiselect: (isEnable ? true : false)}); }; $grid.jqGrid({
UPDATED . If using jQuery in version 1.8 or higher, you need to change the line events = $grid.data("events"); on events = $._data($grid[0], "events"); . Here you can find the modified demo.