title: gridname.getGridParam('selrow') is null
body: <p>I have the code below. Please let me know how i can get the selected row data in jqGrid.</p>
  
  <p>I tried using the below code:</p>
  
  <pre><code>function getlist()
  {   
      var grid = $("#gridname");
      var rowKey = grid.getGridParam('selrow');
      if (rowKey)
          alert("Selected row primary key is: " + rowKey);
      else
          alert("No rows are selected");
  }
  </code></pre>
  
  <p>Here i am getting "rowkey" as null. </p>
  
  <p>This is the function i have used to load json data to jqgrid:</p>
  
  <pre><code>function loadvalues() {    
          $("#gridname").jqGrid({
              datastr: myDataS,
              datatype: "jsonstring",
              jsonReader: {repeatitems: false},
              autoencode:true,
              caption: "&amp;nbsp;",
              pgbuttons : false,
              viewrecords : false,
              pgtext : "",
              pginput : false,
              rownumbers:true,
              cmTemplate: {sortable:false},
              loadonce: true,
              cellsubmit : "clientArray",
  
              colNames: ['col1','col2'],
              colModel: [{
                  name: 'col1',
                  index: 'col1',
                  width: 0
              },{
                  name: 'col2',
                  index: 'col2',
                  width: 0
              }
            }]
          });
      }
  </code></pre>