title: Get Index Row Clicked in jqGrid
body: <p>I want the value of a field in a row that the user Clicked. i Write this code but this code Is wrong.</p>
  
  <pre class="lang-js prettyprint-override"><code>var firstButtonColumnIndex = 0;
      grid = $('#list'), firstButtonColumnIndex, buttonNames = {};
  
  grid.jqGrid({
      url: 'jQGridHandler.ashx',
      datatype: 'local',
      direction: "rtl",
      datatype: 'json',
      height: 250,
      colNames: ['', ''],
      colModel: [
          { name: 'WorkOrderNo', width: 100, sortable: true },
          { name: 'AssetNo', width: 150, sortable: true },
          { name: 'WorkDescription', width: 400, sortable: true },
          { name: 'WorkOrderDate', width: 100, sortable: true },
          { name: 'WorkOrderTime', width: 100, sortable: true },
          { name: 'Remark', width: 260, sortable: true },
          { name: 'del', width: 20, sortable: false, search: false,
              formatter: function () {
                  return "&lt;span class='ui-icon ui-icon-trash'&gt;&lt;/span&gt;"
              }
          },
          { name: 'details', width: 20, sortable: false, search: false,
              formatter: function () {
                  return "&lt;span class='ui-icon ui-icon-document'&gt;&lt;/span&gt;"
              }
          }
      ],
      gridview: true,
      rowNum: 10,
      rowList: [10, 20, 30],
      pager: '#pager',
      //  sortname: 'WorkOrderNo',
      viewrecords: true,
      sortorder: 'asc',
      rownumbers: true,
      beforeSelectRow: function (rowid, e) {
          var iCol = $.jgrid.getCellIndex(e.target);
          if (iCol &gt;= 7) {
              alert("rowid=" + rowid + "\nButton name: " + buttonNames[iCol]);
          }
          // prevent row selection if one click on the button
          return (iCol &gt;= firstButtonColumnIndex) ? false : true;
      }
  });
  
  buttonNames[7] = 'Remove';
  buttonNames[8] = 'Details';
  grid.jqGrid('navGrid', '#pager', { add: false, edit: false, del: false }, {}, {},
      {}, { multipleSearch: true, overlay: false, width: 460 });
  </code></pre>
  
  <p>but in <code>beforeSelectRow</code> event <code>rowid</code> Always 0. i want return <code>WorkOrderNo</code> row clicked.</p>
  
  <p>plese help me.
  thanks all</p>