<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: Inline edit - problem with scrolling</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/inline-edit-problem-with-scrolling</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/inline-edit-problem-with-scrolling/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>kobruleht on Inline edit - problem with scrolling</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/inline-edit-problem-with-scrolling#p24014</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/inline-edit-problem-with-scrolling#p24014</guid>
        	        	<description><![CDATA[<p>This solution causes annoyning flickering:</p>
<p>If scrolled horizontally, click in row displays always leftmost columns and only after that scrolls<br />to current horizontal offset.</p>
<p>How to remove this flash ?</p>
<p><input type='button' class='sfcodeselect' name='sfselectit6731' value='Select Code' data-codeid='sfcode6731' /></p>
<div class='sfcode' id='sfcode6731'>
<p>onSelectRow: function (rowID) {<br />&#160;var grid2 = $(&#34;#grid&#34;);<br />&#160;var scrollPosition;<br />&#160;if (rowID &#38;&#38; rowID !== lastSelectedRow) {<br />&#160;&#160; scrollPosition = grid2.closest(&#34;.ui-jqgrid-bdiv&#34;).scrollLeft();<br />&#160;&#160; grid2.jqGrid(&#39;restoreRow&#39;, lastSelectedRow);<br />&#160;&#160; lastSelectedRow = rowID;<br />&#160;&#160; $(&#34;#grid&#34;).jqGrid(&#39;editRow&#39;);<br />&#160;&#160; setTimeout(function(){ <br />&#160;&#160;&#160;&#160; grid2.closest(&#34;.ui-jqgrid-bdiv&#34;).scrollLeft(scrollPosition);<br />&#160;&#160;&#160;&#160; },100); <br />&#160;&#160; return;<br />&#160;&#160; }<br />&#160;$(&#34;#grid&#34;).jqGrid(&#39;editRow&#39;);<br />&#160;}</p>
</div>
]]></description>
        	        	<pubDate>Wed, 20 Jul 2011 20:19:49 +0300</pubDate>
        </item>
        <item>
        	<title>eros on Inline edit - problem with scrolling</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/inline-edit-problem-with-scrolling#p22926</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/inline-edit-problem-with-scrolling#p22926</guid>
        	        	<description><![CDATA[<p>I&#39;ve found the solution. Here&#39;s the link-&#62; <a href="http://stackoverflow.com/questions/5706703/how-to-reload-jquery-grid-keeping-scroll-position-and-collapse-elements-open" rel="nofollow" target="_blank"><a href="http://stackoverflow.com/quest" rel="nofollow">http://stackoverflow.com/quest</a>.....ments-open</a></p>
</p>
<p>And here&#39;s the solution for the above code(you may use scrollTop() for the vertical scrolling):</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9245' value='Select Code' data-codeid='sfcode9245' /></p>
<div class='sfcode' id='sfcode9245'>&#160;&#160;&#160; onSelectRow: function(id){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(id &#38;&#38; id!==lastsel2){<br /><strong>&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160; <span style=&#34;color: #ff0000;&#34;>var scrollPosition = 0;<br />&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160; scrollPosition = jQuery(&#34;#rowed5&#34;).closest(&#34;.ui-jqgrid-bdiv&#34;).scrollLeft();</span></strong><br />&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //$(this).saveRow(lastsel2, true);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(this).restoreRow(lastsel2);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(this).editRow(id,true);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style=&#34;color: #ff0000;&#34;><strong>jQuery(&#34;#rowed5&#34;).closest(&#34;.ui-jqgrid-bdiv&#34;).scrollLeft(scrollPosition);</strong></span><br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; lastsel2=id;</p>
</div>
]]></description>
        	        	<pubDate>Tue, 26 Apr 2011 04:27:45 +0300</pubDate>
        </item>
        <item>
        	<title>eros on Inline edit - problem with scrolling</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/inline-edit-problem-with-scrolling#p22925</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/inline-edit-problem-with-scrolling#p22925</guid>
        	        	<description><![CDATA[<p>This post is too old but same here. Having problem with in-line editting scroll position.</p>
<p>I&#39;ll give a working example.</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5909' value='Select Code' data-codeid='sfcode5909' /></p>
<div class='sfcode' id='sfcode5909'>&#60;%@ page pageEncoding=&#34;UTF-8&#34; contentType=&#34;text/html;charset=UTF-8&#34;%&#62;<br />&#60;script type=&#34;text/javascript&#34; src=&#34;&#60;c:url value=&#34;/js/jquery/grid.locale-ja.js&#34; /&#62;&#34; charset=&#34;UTF-8&#34;&#62;&#60;/script&#62;<br />&#60;link type=&#34;text/css&#34; rel=&#34;stylesheet&#34; href=&#34;&#60;c:url value=&#34;/css/jquery/ui.jqgrid.css&#34; /&#62;&#34;/&#62;<br />&#60;script src=&#34;&#60;c:url value=&#34;/js/jquery/jquery.jqGrid.min.js&#34; /&#62;&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;<br />&#60;table id=&#34;rowed5&#34;&#62;&#60;/table&#62;<br />&#60;script type=&#34;text/javascript&#34; charset=&#34;utf-8&#34;&#62;<br />var lastsel2;<br />$(&#34;#rowed5&#34;).jqGrid({<br />&#160;&#160;&#160; datatype: &#34;local&#34;,<br />&#160;&#160;&#160; height: 250,<br />&#160;&#160;&#160; width: 250,<br />&#160;&#160;&#160; autowidth : false,<br />&#160;&#160;&#160; shrinkToFit : false,<br />&#160;&#160;&#160; colNames:[&#39;ID Number&#39;,&#39;Name&#39;, &#39;Stock&#39;, &#39;Ship via&#39;,&#39;Notes&#39;],<br />&#160;&#160;&#160; colModel:[<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;id&#39;,index:&#39;id&#39;, width:90, sorttype:&#34;int&#34;, editable: true},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;name&#39;,index:&#39;name&#39;, width:150,editable: true,editoptions:{size:&#34;20&#34;,maxlength:&#34;30&#34;}},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;stock&#39;,index:&#39;stock&#39;, width:60, editable: true,edittype:&#34;checkbox&#34;,editoptions: {value:&#34;Yes:No&#34;}},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;ship&#39;,index:&#39;ship&#39;, width:90, editable: true,edittype:&#34;select&#34;,editoptions:{value:&#34;FE:FedEx;IN:InTime;TN:TNT;AR:ARAMEX;AR1:ARAMEX123456789&#34;}},&#160;&#160;&#160;&#160;&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;note&#39;,index:&#39;note&#39;, width:200, sortable:false,editable: true,edittype:&#34;textarea&#34;, editoptions:{rows:&#34;2&#34;,cols:&#34;10&#34;}}&#160;&#160;&#160;&#160; &#160;<br />&#160;&#160;&#160; ],<br />&#160;&#160;&#160; caption: &#34;Input Types&#34;,<br />&#160;&#160;&#160; resizeStop: function (newwidth, index) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; var selectedRowId = $(&#34;#rowed5&#34;).getGridParam(&#39;selrow&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(selectedRowId) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //resize combobox proportionate to column size<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var selectElement = $(&#39;[id=&#34;&#39; + selectedRowId + &#39;_ship&#34;][role=&#34;select&#34;]&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(selectElement.length &#62; 0){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(selectElement).width(newwidth);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160; }<br />&#160;&#160;&#160; ,<br />&#160;&#160;&#160; onSelectRow: function(id){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(id &#38;&#38; id!==lastsel2){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //$(this).saveRow(lastsel2, true);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(this).restoreRow(lastsel2);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(this).editRow(id,true);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; lastsel2=id;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(this).scroll();</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //resize combobox proportionate to column size<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var rowSelectElements = $(&#39;[id^=&#34;&#39; + id + &#39;_&#34;][role=&#34;select&#34;]&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(rowSelectElements.length &#62; 0) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(rowSelectElements).each(function(index, element){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var name = $(element).attr(&#39;name&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var columnElement = $(&#39;#rowed5_&#39; + name);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(columnElement.length &#62; 0) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var columnWidth = $(columnElement).width();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(element).width(columnWidth);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160; }<br />});<br />var mydata2 = [<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id:&#34;12345&#34;,name:&#34;Desktop Computer&#34;,note:&#34;note&#34;,stock:&#34;Yes&#34;,ship:&#34;FedEx&#34;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id:&#34;23456&#34;,name:&#34;Laptop&#34;,note:&#34;Long text &#34;,stock:&#34;Yes&#34;,ship:&#34;InTime&#34;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id:&#34;34567&#34;,name:&#34;LCD Monitor&#34;,note:&#34;note3&#34;,stock:&#34;Yes&#34;,ship:&#34;TNT&#34;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id:&#34;45678&#34;,name:&#34;Speakers&#34;,note:&#34;note&#34;,stock:&#34;No&#34;,ship:&#34;ARAMEX123456789&#34;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id:&#34;56789&#34;,name:&#34;Laser Printer&#34;,note:&#34;note2&#34;,stock:&#34;Yes&#34;,ship:&#34;FedEx&#34;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id:&#34;67890&#34;,name:&#34;Play Station&#34;,note:&#34;note3&#34;,stock:&#34;No&#34;, ship:&#34;FedEx&#34;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id:&#34;76543&#34;,name:&#34;Mobile Telephone&#34;,note:&#34;note&#34;,stock:&#34;Yes&#34;,ship:&#34;ARAMEX&#34;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id:&#34;87654&#34;,name:&#34;Server&#34;,note:&#34;note2&#34;,stock:&#34;Yes&#34;,ship:&#34;TNT&#34;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id:&#34;98765&#34;,name:&#34;Matrix Printer&#34;,note:&#34;note3&#34;,stock:&#34;No&#34;, ship:&#34;FedEx&#34;}<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ];<br />for(var i=0;i &#60; mydata2.length;i++) {<br />&#160;$(&#34;#rowed5&#34;).jqGrid(&#39;addRowData&#39;,mydata2[i].id,mydata2[i]);<br />}<br />&#60;/script&#62;</p>
</div>
]]></description>
        	        	<pubDate>Tue, 26 Apr 2011 04:05:56 +0300</pubDate>
        </item>
        <item>
        	<title>Torge on Inline edit - problem with scrolling</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/inline-edit-problem-with-scrolling#p22373</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/inline-edit-problem-with-scrolling#p22373</guid>
        	        	<description><![CDATA[<p>I have the same problem.</p>
</p>
<p>I tried to use onCellSelect to scroll the cell back to fokus, but there is still a jump whcih is too confusing. ( each row has a bunch of checkboxes, this way the user will certainly check the wrong one)</p>
</p>
<p>Is there a way to prevent the row to scroll back to origin?</p>
]]></description>
        	        	<pubDate>Fri, 11 Mar 2011 16:28:09 +0200</pubDate>
        </item>
        <item>
        	<title>turok on Inline edit - problem with scrolling</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/inline-edit-problem-with-scrolling#p19919</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/inline-edit-problem-with-scrolling#p19919</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I use jqGrid in my project to display table data with large amount of columns,&#160;to have a nice view of grid I use horizontal scrolling. I use jqGrid in inline edit mode. And I have&#160;a trouble -&#160;i.e. I scroll grid with over 200 columns and watch data in row&#160;#5. In column&#160;i.e. # 134 I found bad data and desided to edit it, so I&#160;doubleclicked&#160;the row&#160;to&#160;switch row #5 in edit mode. Row switched successfully to edit mode, BUT&#160;the scroll position changed to the begin of the&#160;table at possition&#160;0. (grid.bDiv.scrollLeft = 0). So I need again scrolling and search column #134 it&#39;s difficult, and it&#39;s exasperate. I want grid to stay at the same scroll possition. I tryed to save grid.bDiv.scrollLeft before exec editRow and restore it in oneditfunc, but it did not help. I tryed to find code in jquery.jqGrid.min.js where scrollLeft sets to zero, but did not find.</p>
<p>Could anybody can help me to solve this trouble???</p>
<p>Any comments...</p>
]]></description>
        	        	<pubDate>Wed, 22 Sep 2010 07:28:48 +0300</pubDate>
        </item>
</channel>
</rss>