I love jqGrid but sometimes things seem more complicated than they should be.
What I would like to achieve is to have a checkbox on each row so that a user can choo
For people (like me) that end up on this answer after searching on Google, there is a very easy solution to this problem since jqGrid 4.0.0.
It's enough to add the css-class 'ui-state-disabled' to the row that you don't want to be selected. See The changelog of jqGrid 4.0.0. And you could still combine that with hiding or disabling the checkbox.
var $jqgrid = $("#jqgridselector");
//loop through all rows
$(".jqgrow", $jqgrid).each(function (index, row) {
var $row = $(row);
if ($row === condition) {
//Find the checkbox of the row and set it disabled
$row.find("input:checkbox").attr("disabled", "disabled");
//add class ui-state-disabled, because thats how jqGrid knows not to take them into account for selection
$row.addClass("ui-state-disabled");
//I overwrite the opactity of the ui-state-disabled class to make the row look 'normal'
$row.css("opacity", 1);
}
});