title: In inline editing in jqgird how to check whether any row is selected or not?
body: <p>In inline editing in jqgird how to check whether any row is selected or not?</p>
  
  <p>I want to display error message "Please select a row!" when user click on edit without selecting any row.</p>
  
  <p>@Oleg here is the code:</p>
  
  <pre><code>gridobject.jqGrid({
      url: getUrl,
      datatype: 'json',
      mtype: 'Get',
      colNames: arryDisplayCol,
      colModel: arryColSettings,
      pager: jQuery(pPagerName),
      rowNum: 20,
      rowList: [20, 40, 80, 100],
      height: '100%',
      viewrecords: true,
      loadonce: false,
      grouping: false,
      caption: caption,
      emptyrecords: 'No records to display',
      jsonReader: {
          root: "rows",
          page: "page",
          total: "total",
          records: "records",
          repeatitems: false,
          Id: "0",
      },
      sortable: {
          update: function (relativeColumnOrder) {
              var grid = gridobject;
              var currentColModel = grid.getGridParam('colModel');
              $.ajax({
                  url: urls.Common.ArrangeGridOrder,
                  type: 'POST',
                  data: JSON.stringify(currentColModel),
                  contentType: 'application/json; charset=utf-8',
                  success: function (response) {
  
                  },
                  error: function (xhr, status, error) {
                  }
              });
          }
      },
      autowidth: true,
      shrinkToFit: true,
      multiselect: IsCheckbox,
      editData: myData,
      sortname: arrColSettings[0].name,
      editurl: urls.Admin.ProcessRequest,
      serializeRowData: function (postdata) {
          var tableNames = $("#grdData").getGridParam('caption').replace(' List', '');
          var columnNames = $("#grdData").getGridParam('colNames');
          var colNames = columnNames.toString();
          for (var i = 0; i &lt; columnNames.length; i++) {
              var colName;
              if (columnNames[i] == "Id") {
                  colName = "Id"
              }
          }
          if (!colName) {
              colName = columnNames[1].toString();
          }
          var sel_id = $("#grdData").getSelectedRowsIds();
          rowData = jQuery("#grdData").getRowData(sel_id);
  
          var colValue = rowData[colName];
          return { x01: JSON.stringify(postdata), x02: tableNames, x03: colNames, x04: JSON.stringify(jsonType), x05: colName, x06: colValue };
      },
      reloadAfterSubmit: true,
  
  }).navGrid(pPagerName, {
      edit: false,
      add: false,
      del: false,
      search: false,
      refresh: true,
      refreshtext: "Refresh",
      beforeRefresh: function () {
          var tableName = $("#grdData").getGridParam('caption').replace(' List', '');
          ReloadGrid(tableName);
      },
  });
  
  gridobject.jqGrid('inlineNav', pPagerName,
                  {
  
                      edit: true,
                      editicon: "ui-icon-pencil",
                      add: true,
                      addicon: "ui-icon-plus",
                      save: true,
                      saveicon: "ui-icon-disk",
                      cancel: true,
                      cancelicon: "ui-icon-cancel",
  
                      editParams: {
                          keys: false,
                          oneditfunc: null,
                          successfunc: function (val) {
                              if (val.responseText != "") {
                                  var tableName = $("#grdData").getGridParam('caption').replace(' List', '');
                                  ReloadGrid(tableName);
                              }
                          },
                          url: null,
                          aftersavefunc:null,
                          errorfunc: null,
                          afterrestorefunc: null,
                          restoreAfterError: true,
                          mtype: "POST",
                          alertcap: "Warning",
                          alerttext: "Please, select row"
                      },
                      addParams: {
                          useDefValues: true,
                          addRowParams: {
                              keys: true,
                              extraparam: {},
                              successfunc: function (val) {
                                  if (val.responseText != "") {
                                      var tableName = $("#grdData").getGridParam('caption').replace(' List', '');
                                      ReloadGrid(tableName);
                                  }
                              }
                          }
                      }
  
  
                  }
      );
  </code></pre>