Q:

jqGrid Set Selected Rows

I have a jqgrid with multiselect true and I want to set some of rows.(I know the row ids.) How can I do that?
I mean opposite of 
$("#myTable").jqGrid('getGridParam', 'selarrrow');

as like:
$("#myTable").jqGrid('setGridParam', 'selarrrow', rowArray);

A:

You have to loop through the rowArray array and call setSelection method for every rowid from the rowArray:
var i, count, $grid = $("#myTable");
for (i = 0, count = rowArray.length; i < count; i += 1) {
    $grid.jqGrid('setSelection', rowArray[i], false);
}

A:

$.each(rowsToSelect, function(_, rowId) {
    $grid.setSelection(rowId, false);
});

No much difference. Just seemed neater :)

