title: How to set focus on specific cell in onSelectRow in inline edit jqgrid
body: <p>How to set focus on specific cell in onSelectRow in inline edit jqgrid?</p>
  
  <p>I have tried the answers from:<br/>
  1. <a href="https://stackoverflow.com/questions/9161953/need-jqgrid-inline-editing-to-have-focus-go-to-clicked-cell">Need jqGrid inline editing to have focus go to clicked cell</a><br/>
  2. <a href="https://stackoverflow.com/questions/7219598/how-to-set-focus-to-cell-which-was-clicked-to-start-inline-edit-in-jqgrid">How to set focus to cell which was clicked to start inline edit in jqgrid</a><br/>
  3. <a href="https://stackoverflow.com/questions/6536654/how-to-edit-the-selected-cell-on-jqgrid/6538102#6538102">How to edit the selected cell on jqGrid</a><br/>
  4. <a href="https://stackoverflow.com/questions/14825722/set-the-focus-to-the-editable-input-field-on-select-row-in-jqgrid">Set the focus to the editable input field on select row in jqgrid</a><br/></p>
  
  <p>but none of that works! </p>
  
  <p>So now I don't need to find what cell the user clicked, but I need the cursor to be exactly in "lg_description" column for each row. Which I guess the problem is with the e parameter, and I think when I set it to "lg_description" column, I just need to attach "lg_description" somewhere instead of e parameter.</p>
  
  <p><strong>EDITED:</strong><br/>
  This is my code:</p>
  
  <pre><code>onSelectRow: function(id, status, e){
      var grid = $(this); 
      if(id &amp;&amp; id!==lastSel){               
          grid.restoreRow(lastSel);   
          lastSel=id;
  
          //cursor focus
  
          //first attemp: $("#lg_description").focus();
          //second attemp: $("input, select",e.target).focus();
          //third attemp: document.getElementById("lg_description").focus();
          //fourth attemp:
          /*var setFocusToCell = function(e) {
              if(!e || !e.target) return;
              var $td = $(e.target).closest("td"), $tr = $td.closest("tr.jqgrow"), ci, ri, rows = this.rows;
              if ($td.length === 0 || $tr.length === 0 || !rows) return;
              ci = $.jgrid.getCellIndex($td[0]);
              ri = $tr[0].rowIndex;
              $(rows[ri].cells[ci]).find("input,select").focus();
          }
          setFocusToCell(e);*/
      }
      grid.editRow(id, true,"","","","",aftersavefunc);  
      //fifth attemp: grid.editRow(id, true,function() {$("#lg_description").focus();},"","","",aftersavefunc);
   },
  </code></pre>
  
  <p>I have tried 5 different attemps where the fifth one is a substitute for the code above it</p>