<?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: scroll into view</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view</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/feature-request/scroll-into-view/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>ignrac on scroll into view</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p9860</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p9860</guid>
        	        	<description><![CDATA[<p>Indeed, the jq_last_visit variable contains numeric data (&#39;2755 &#39;).<br />However, I changed the code to make it a string data type ( &#39;r2755&#39;), the behavior is the same, the row is selected and not scroll in view.<br />I tested from GitHub grid.base same thing.<br />After many tests, I found the solution: the problem occurs when there is no previously selected row.<br />I changed the code to:</p>
<p>&#160;&#160;&#160;&#160; gridComplete: function() {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery(&#8221;#list&#8221;).setSelection(jq_first_row_id("#list"));<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (jq_rowsBackground !== undefined) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (jq_rowsBackground.records &#62; 0) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $.each(jq_rowsBackground.rows, function(row){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery(&#39;tr#&#39;+ this,&#39;#list&#39;).css({background:&#39;#d3f7cf&#39;});<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;&#160;&#160;&#160; if (jq_last_visit != 0){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery(&#8221;#list&#8221;).setSelection(jq_last_visit);<br />&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160; }</p>
<p>function jq_first_row_id(gridID){<br />&#160;&#160;&#160; var grid = jQuery(gridID);<br />&#160;&#160;&#160; rowsID = grid.getDataIDs();<br />&#160;&#160;&#160; return rowsID[0];<br />}</p>
<p>In the button click event:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; jQuery(&#8221;#list&#8221;).setSelection(jq_first_row_id("#list"));<br />&#160;&#160;&#160;&#160;&#160;&#160; if (jq_last_visit != 0){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery(&#8221;#list&#8221;).setSelection(jq_last_visit);<br />&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>Now is scroll in view. (Clearly, there is always checked rows in grid.). Only a &#39;mini&#39; problem:  only middle row in view, because the row height is not multiple of the height of the grid table.</p>
<p>Many thanks for your assistance.</p>
<p>Best regards,</p>
<p>Ignacio</p>
]]></description>
        	        	<pubDate>Fri, 18 Sep 2009 11:57:37 +0300</pubDate>
        </item>
        <item>
        	<title>tony on scroll into view</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p9820</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p9820</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Not sure if this is a case, but there was a bug (which is corrected in GitHub) when the parameter is number - i.e. in your case jq_last_visit is number. Try this:</p>
<p>jQuery(&#8221;#list&#8221;).setSelection(jq_last_visit+"");</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 18 Sep 2009 03:31:12 +0300</pubDate>
        </item>
        <item>
        	<title>ignrac on scroll into view</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p9782</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p9782</guid>
        	        	<description><![CDATA[<p>Hi tony,</p>
<p>jqGrid 3.5.3,&#160; &#39;scrollrows&#39; parameter not scroll to row selected. The row is selected but not scroll in view.</p>
<p>I tried in &#39;gridcomplete&#39; event and a button click event.</p>
</p>
<p>The grid options are simple:</p>
<p>jQuery("#list").jqGrid({</p>
<p>&#160;&#160;&#160; url: jq_url,<br />&#160;&#160;&#160; datatype: "xml",<br />&#160;&#160;&#160; colNames:[etc, etc],<br />&#160;&#160;&#160; colModel:[{etc},{etc}],<br />&#160;&#160;&#160; &#160;rowNum:25,<br />&#160;&#160;&#160; &#160;rowList:[25,50,75],<br />&#160;&#160;&#160; &#160;gridview: true,<br />&#160;&#160;&#160;&#160; scrollrows: true,<br />&#160;&#160;&#160; &#160;height: jq_Height,<br />&#160;&#160;&#160; &#160;hidegrid: false,<br />&#160;&#160;&#160;&#160; loadui:"block",<br />&#160;&#160;&#160; &#160;caption: jq_caption,<br />&#160;&#160;&#160;&#160; loadBeforeSend: function(xhr){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jq_rowsBackground = rowsBackground();<br />&#160;&#160;&#160;&#160; },<br />&#160;&#160;&#160;&#160; gridComplete: function() {<br />&#160;&#160; &#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (jq_rowsBackground !== undefined) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (jq_rowsBackground.records &#62; 0) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $.each(jq_rowsBackground.rows, function(row){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery(&#39;tr#&#39;+ this,&#39;#list&#39;).css({background:&#39;#d3f7cf&#39;});<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;&#160;&#160;&#160; if (jq_last_visit != 0){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#list").setSelection(jq_last_visit);<br />&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160; &#160;}</p>
<p>});</p>
<p>Code Comments: (All &#39;jq*&#39; are Javascript variables. No Pager if datasource is ODBC, Pager active if datasource is MySql.)</p>
<p>Best regards,</p>
<p>Ignacio</p></p>
]]></description>
        	        	<pubDate>Wed, 16 Sep 2009 17:55:06 +0300</pubDate>
        </item>
        <item>
        	<title>tony on scroll into view</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p8497</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p8497</guid>
        	        	<description><![CDATA[<p>Hello glemarie,</p>
<p>You use this in loadComplete - this will not work - since not all the data is alredy into the grid. Try to use this after the grid is loaded</p>
<p>and you will see that this will work. Not sure what you try to do, but maybe gridComplete is your event.</p>
<p>A simple test:</p>
<p>$("#mybutton").click(function(){</p>
<p>// here your code with set selection</p>
<p>})</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 13 Aug 2009 01:17:21 +0300</pubDate>
        </item>
        <item>
        	<title>Joe on scroll into view</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p8450</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p8450</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I have the same problem too.</p>
<p>I ture on the scrollrows and use setSelection.</p>
<p>the row was&#160; been selected correctly,</p>
<p>but the scroll bar still can&#39;t fouce on the new row.</p>
<p>Plx help!</p>
]]></description>
        	        	<pubDate>Tue, 11 Aug 2009 10:55:16 +0300</pubDate>
        </item>
        <item>
        	<title>glemarie on scroll into view</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p8424</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p8424</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>My code was not properly included in my post, but my syntax is correct : I use the setSelection mothod...</p>
]]></description>
        	        	<pubDate>Mon, 10 Aug 2009 10:27:04 +0300</pubDate>
        </item>
        <item>
        	<title>tony on scroll into view</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p8038</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p8038</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>It is not setSelected, but <strong>setSelection</strong> - check the right syntax in the docs.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 27 Jul 2009 02:04:44 +0300</pubDate>
        </item>
        <item>
        	<title>glemarie on scroll into view</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p8017</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p8017</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I use scrollrows:true and setSelected, but the grid does not scroll dynamically (the row is correctly selected). My code is :</p>
</p>
<pre id="line170">jQuery(document).ready(function(){<br />		var initialLoad = true;<br />		jQuery("#listSociete").jqGrid({	<br />			<strong>scrollrows : true, </strong><br />			url:&#39;getValues.php?type=contentSociete&#39;,<br />			datatype: "json",<br />			colNames:[&#39;Nom&#39;,&#39;Secteur d\\&#39;Activit&#38;eacute;&#39;, &#39;Progiciel&#39;, &#39;Commercial&#39;],<br />			colModel:[<br />				{name:&#39;Nom&#39;,index:&#39;Nom&#39;, align:"left", sortable:true, search: true},<br />				{name:&#39;NomSecteur&#39;,index:&#39;NomSecteur&#39;, sortable:true, search: true},<br />				{name:&#39;NomOutil&#39;,index:&#39;NomOutil&#39;, sortable:true, search: true}<br />				,{name:&#39;NomCommercial&#39;,index:&#39;NomCommercial&#39;, sortable:true, search: true}<br />			],<br />			hidegrid: false,<br />			hiddengrid: false,<br />			loadui:&#39;block&#39;,<br />			loadtext:"Chargement...",<br />			pager: jQuery(&#39;#pagerSociete&#39;),<br />			pgbuttons:false,<br />			pginput:false,<br />			viewrecords:true,<br />			sortname: &#39;Nom&#39;,<br />			sortorder: "asc",<br />			caption: "Soci&#38;eacute;tes",<br />			forceFit: true,<br />			loadonce: false,<br />			width: 1000,<br />			onSelectRow: function(rowid) { <br />				// Memorisation de la societe selectionnee<br />				memoriseVariable(&#39;societeSelected&#39;, rowid); // Puts id in a COOKIE<br />			},<br />			loadComplete: function() {<br />				// Selection de la ste memorisee<br />				if (initialLoad &#38;&#38; recupereVariable(&#39;societeSelected&#39;)) // If first lload and cookie is set<br />					<strong>jQuery("#listSociete").setSelection(recupereVariable(&#39;societeSelected&#39;), true);	</strong>			<br />				initialLoad = false;<br />			}<br />		}); <br /></pre>
]]></description>
        	        	<pubDate>Fri, 24 Jul 2009 07:52:48 +0300</pubDate>
        </item>
        <item>
        	<title>tony on scroll into view</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p5673</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p5673</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Use the newly&#160; option <strong>scrollrows : true</strong> and then apply a setSelection to the new added row - jqGrid is flexible 🙂</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 30 Mar 2009 03:44:41 +0300</pubDate>
        </item>
        <item>
        	<title>sledge on scroll into view</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p5634</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/scroll-into-view#p5634</guid>
        	        	<description><![CDATA[<p>Hello, I won&#39;t repeat myself, that this plugin is the best;</p>
<p>Is it possible to automatically scroll the newly added row into focus (visibility)?</p>
<p>I have modified grid.base.js:addRowData with row.scrollTop = 0; but it did not do the job..</p>
<p>Thanks huge!<br />-- <br />sledge</p></p>
]]></description>
        	        	<pubDate>Thu, 26 Mar 2009 09:20:56 +0200</pubDate>
        </item>
</channel>
</rss>