title: how to know JqGrid multiselect 'select all' checkbox is checked
body: <p>Im trying to display the selected row in JQgrid. Now, i have this code:</p>
  
  <pre><code>onSelectRow:function(rowid){
      var selectedRow = $('#mygrid').jqGrid('getGridParam', 'selarrrow');
      $("#totalSelected").val(selectedRow .length); 
  }
  </code></pre>
  
  <p>Its work fine, but then when the 'select all' checkbox is checked, it didn't trigger this code, eventhough in visual we can see that all row has been selected.</p>
  
  <p>so i'm thinking that if i know that the 'select all' checkbox is checked, i can set the total selected value like this:</p>
  
  <pre><code>  if(//selectall checkbox is checked) 
        $("#totalSelected").val($("#mygrid tr").length-1);
  </code></pre>
  
  <p>I've tried this code by refering to <a href="https://stackoverflow.com/a/6213082/2817802">this answer</a>, but im pretty sure .checked() is not recognized: </p>
  
  <pre><code>  if($("#cb_mygrid"[0].id).checked()) 
        $("#totalSelected").val($("#mygrid tr").length-1);
  </code></pre>
  
  <p>Any idea is much appreciated</p>