title: How to keep horizontal scroll position of jqGrid while inline-editing?
body: <p>I have a jqGrid table on my page, with lots of columns, so the grid is wider than browser window, horizontal scrollbar appears. </p>
  
  <p>The problem is, that when user clicks on a row to begin editing, browser frame is scrolled to the left, thus confusing the user and even sometimes hiding the choosen cell.</p>
  
  <p>I've tried the methods which i've found <a href="https://stackoverflow.com/questions/5706703/how-to-reload-jquery-grid-keeping-scroll-position-and-collapse-elements-open">here</a> and <a href="http://www.trirand.com/blog/?page_id=393/help/inline-edit-problem-with-scrolling/" rel="nofollow noreferrer">here</a>, but they don't work for me - i can retreive current scroll position, but i can't set it.
  Cells are set as editable in columnsModel, so i get scroll position at formatCell event and try to set scroll position at afterEditCell with the following code:</p>
  
  <pre><code>afterEditCell: function(rowid, cellname, value, irow, icol) { 
  
   jQuery("#list").closest(".ui-jqgrid-bdiv").scrollLeft(scrollPosition);
   window.scrollTo(scrollPosition,0);
   if (window.pageXOffset) {window.pageXOffset = scrollPosition;};
   if (document.body.parentElement) {document.body.parentElement.scrollLeft = scrollPosition;};   
   if (document.body) {document.body.scrollLeft = scrollPosition;};
  </code></pre>
  
  <p>And, this does not affect anyhow the behavior of grid - it scrolls to the most left position.</p>
  
  <p>Are there any other ways to implement this?</p>