title: jQgrid: multiselect true - make each row checked by default on page load
body: <pre><code>jQuery("#grid").jqGrid({
      url:call_url,
          datatype: "json",
      height: 'auto',
      rowNum: 20,
      rowList: [20,30,40],
      colNames:[&lt;?php echo $col;?&gt;],
      colModel:[
                  {name:'USER_ID',index:'USER_ID', align:'center',search:false,hidden:true,key:true},
          {name:'PROJECT_NAME',index:'PROJECT_NAME', align:'center',search:false,hidden: true},
          {name:'EMP_NAME',index:'EMP_NAME', sortable:true,summaryType:'count',summaryTpl : 'Total ({0}) Resource Hours' },
          &lt;?php for($i=1;$i&lt;=count($cal_arr);$i++) {?&gt;
          {name:'&lt;?php echo $i;?&gt;',index:'&lt;?php echo $i;?&gt;',search:false,align:"center",sortable:false ,width:80 },
          &lt;?php } ?&gt;
      ],
      pager: "#page",
          multiselect: true,
      shrinkToFit :true,
      autowidth: true,
      viewrecords: true,
      grouping: true, 
      groupingView : { groupField : ['PROJECT_NAME'], 
                      groupColumnShow : [false], 
                      groupText : ['&lt;b&gt;{0}&lt;/b&gt;'],
                      groupCollapse : false, 
                      groupOrder: ['asc'], 
                      groupSummary : [true], 
                      showSummaryOnHide: true,
                      groupDataSorted : true },
      sortname: 'EMP_NAME',
      caption: "Programatically block selection of some grid row',
      gridComplete: function () {
                      var recs = $("#grid").getGridParam("records");
                      $( ".mycontent" ).remove();
                      if (recs == 0 || recs == null) {
                          $('#grid').after("&lt;div class='mycontent' style='color:red;text-align:center'&gt;No Record Found&lt;/div&gt;");
                          $("#btn_submit").hide();
                      }
              },
  
  
          loadComplete: function () {
              $("#cb_grid").click(); 
          },
  
              rowattr: function (item) {
                      if (parseInt(item.ID) == 1) {
                          return {"class": "ui-state-disabled ui-jqgrid-disablePointerEvents"};
                      }
              },
  
              //prevent selection of disabled rows
              beforeSelectRow: function (rowid, e) {
                  if ($(e.target).closest("tr.jqgrow").hasClass("ui-state-disabled")) {
                      return false;   // not allow select the row
                  }
                  return true;    // allow select the row
              }
  
  })
  </code></pre>
  
  <p>Above code does this</p>
  
  <p><img src="https://i.stack.imgur.com/gQh9J.png" alt="Does this"></p>
  
  <p>Required is</p>
  
  <p><img src="https://i.stack.imgur.com/RrQp7.png" alt="This is required"></p>
  
  <p>Using jqGrid with <code>multiselect:true</code> how to set each row checked by default on page load ? jQgrid Version - 4.6</p>