<?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: getSelectedRow parsing incorrect values?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values</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/getselectedrow-parsing-incorrect-values/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on getSelectedRow parsing incorrect values?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p923</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p923</guid>
        	        	<description><![CDATA[<p>Thank you.</p>
<p>I will investigate why url is not working. But it seems that a click event</p>
<p>have something to do in this case. I have a similar problem</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 27 Jun 2008 09:01:42 +0300</pubDate>
        </item>
        <item>
        	<title>mahers on getSelectedRow parsing incorrect values?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p921</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p921</guid>
        	        	<description><![CDATA[<p>That works!</p>
<p>Thanks for the workaround.</p>
]]></description>
        	        	<pubDate>Fri, 27 Jun 2008 08:51:39 +0300</pubDate>
        </item>
        <item>
        	<title>tony on getSelectedRow parsing incorrect values?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p920</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p920</guid>
        	        	<description><![CDATA[<p>Could you plese try this:</p>
<p>Just curios to see if this will work</p>
<p>$(&#8221;#addyear&#8221;).click(function(){&#160; <br />&#160;&#160;&#160; bb = jQuery(&#8221;#schools&#8221;).getSelectedRow(); <br />&#160;&#160;&#160; alert(bb);</p>
<p>&#160;&#160; jQuery("#years").setGridParam({editurl: &#39;setdata.php?s=2&#38;sid=&#39;+bb}); <br />&#160;&#160;&#160; if( bb != null ) { <br />&#160;&#160;&#160; jQuery(&#8221;#years&#8221;).editGridRow(&#39;new&#39;,{ <br />&#160;&#160;&#160; &#160;&#160;&#160; height:100, <br />&#160;&#160;&#160; &#160;&#160;&#160; width:200, <br />&#160;&#160;&#160; &#160;&#160;&#160; reloadAfterSubmit:false, <br />&#160;&#160;&#160; &#160;&#160;&#160; closeAfterAdd:true, <br />&#160;&#160;&#160; &#160;&#160;&#160; closeAfterEdit:true, <br />&#160;&#160;&#160; &#160;&#160;&#160; drag:true, <br />&#160;&#160;&#160; &#160;&#160;&#160; modal:true, <br />&#160;&#160;&#160; &#160;&#160;&#160; afterSubmit: function(server_data, posted_data) { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; result = server_data.responseText.split(&#8221;;&#8221;); <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; //alert(result[1]); <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if (result[0] == &#8220;success&#8221;) <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; return [true,"",result[1]]; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; else return [false,"Error inserting row"]; <br />&#160;&#160;&#160; &#160;&#160;&#160; } <br />&#160;&#160;&#160; });&#160; <br />&#160;&#160;&#160; } <br />&#160;&#160;&#160; else { <br />&#160;&#160;&#160; &#160;&#160;&#160; alert(&#8221;Please select a school to add years to.&#8221;); <br />&#160;&#160;&#160; } <br />});</p>
]]></description>
        	        	<pubDate>Fri, 27 Jun 2008 08:47:18 +0300</pubDate>
        </item>
        <item>
        	<title>mahers on getSelectedRow parsing incorrect values?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p919</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p919</guid>
        	        	<description><![CDATA[<p>I&#39;m using the standard js files as i&#39;m putting the following alert in grid.formedit.js (3.2rc):</p>
<p>271:&#160; // we add to pos data array the action - the name is oper <br />272: postdata.oper = postdata.id == &#8220;_empty&#8221; ? &#8220;add&#8221; : &#8220;edit&#8221;; <br />273: alert(url); <br />274: $.ajax({</p>
<p>The alert is displayed, but the url var is not updated, even though the parsed url has changed (url:&#39;setdata.php?s=2&#38;sid=&#39;+bb). Its like once it is set it cannot be changed?</p>
]]></description>
        	        	<pubDate>Fri, 27 Jun 2008 08:23:37 +0300</pubDate>
        </item>
        <item>
        	<title>tony on getSelectedRow parsing incorrect values?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p918</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p918</guid>
        	        	<description><![CDATA[<p>Check to see if you use the min version in jquery.jqgrid.js then replace the appropriate way</p>
]]></description>
        	        	<pubDate>Fri, 27 Jun 2008 08:16:35 +0300</pubDate>
        </item>
        <item>
        	<title>mahers on getSelectedRow parsing incorrect values?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p916</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p916</guid>
        	        	<description><![CDATA[<p>On both occasions the url parsed to Ajax does not change.</p>
<p>I&#39;ve cleared cache and tried different browsers (opera, FF).</p>
]]></description>
        	        	<pubDate>Fri, 27 Jun 2008 08:13:49 +0300</pubDate>
        </item>
        <item>
        	<title>tony on getSelectedRow parsing incorrect values?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p915</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p915</guid>
        	        	<description><![CDATA[<p>This should work.</p>
<p>I recommend you to clear the cache. Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 27 Jun 2008 08:09:10 +0300</pubDate>
        </item>
        <item>
        	<title>mahers on getSelectedRow parsing incorrect values?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p914</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p914</guid>
        	        	<description><![CDATA[<p>I tried with the new grid.formedit.js with the same problem. It appears to be only be setting the url variable once. Adding an alert in just before the ajax call on line 273 of the new grid.formedit.js file shows the same url, even though this has changed in the editGridRow call in my &#160;&#160; jQuery(&#8221;#years&#8221;).editGridRow(&#39;new&#39;... etc function.</p>
]]></description>
        	        	<pubDate>Fri, 27 Jun 2008 07:57:39 +0300</pubDate>
        </item>
        <item>
        	<title>tony on getSelectedRow parsing incorrect values?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p910</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p910</guid>
        	        	<description><![CDATA[<p>Replace only grid.formedit.js -&#160; this should work</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 27 Jun 2008 07:46:45 +0300</pubDate>
        </item>
        <item>
        	<title>mahers on getSelectedRow parsing incorrect values?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p908</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p908</guid>
        	        	<description><![CDATA[<p>I still seem to get the same problem after upgrading to 3.2rc 🙁</p>
]]></description>
        	        	<pubDate>Fri, 27 Jun 2008 07:28:24 +0300</pubDate>
        </item>
        <item>
        	<title>mahers on getSelectedRow parsing incorrect values?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p907</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p907</guid>
        	        	<description><![CDATA[<p>Thanks Tony, i&#39;ll try 3.2rc.</p>
</p>
<p>The only reason i&#39;m doing this is because the Sch_ID is from a different table and from what I gather you cannot override the parsed ID (which is "_empty" because its on adding a new record.</p>
</p>
<p>Awesome product though, makes admin update/edit/delete functions alot easier!</p>
]]></description>
        	        	<pubDate>Fri, 27 Jun 2008 07:17:50 +0300</pubDate>
        </item>
        <item>
        	<title>tony on getSelectedRow parsing incorrect values?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p905</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p905</guid>
        	        	<description><![CDATA[<p>You do not need to do that. The id of the posted data is passed automatically. If you fave FireBug you can see what is posted.</p>
<p>Maybe you use 3.1 version. This bug is corrected in 3.2rc, but one user reported that there is a something wrong with the replacement (zip). Could you please use 3.2rc. In this case your code should work.</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 27 Jun 2008 07:08:53 +0300</pubDate>
        </item>
        <item>
        	<title>mahers on getSelectedRow parsing incorrect values?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p903</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getselectedrow-parsing-incorrect-values#p903</guid>
        	        	<description><![CDATA[<p>I&#39;m working with two tables, one containing schools, the other years for the schools. I&#39;m trying to select a school then set the url for the editGridRow function to parse the php. This is the code to add a year to a school:</p>
<p>$(&#8221;#addyear&#8221;).click(function(){&#160; <br />&#160;&#160;&#160; bb = jQuery(&#8221;#schools&#8221;).getSelectedRow(); <br />&#160;&#160;&#160; alert(bb); <br />&#160;&#160;&#160; if( bb != null ) { <br />&#160;&#160;&#160; jQuery(&#8221;#years&#8221;).editGridRow(&#39;new&#39;,{ <br />&#160;&#160;&#160; &#160;&#160;&#160; height:100, <br />&#160;&#160;&#160; &#160;&#160;&#160; width:200, <br />&#160;&#160;&#160; &#160;&#160;&#160; reloadAfterSubmit:false, <br />&#160;&#160;&#160; &#160;&#160;&#160; closeAfterAdd:true, <br />&#160;&#160;&#160; &#160;&#160;&#160; closeAfterEdit:true, <br />&#160;&#160;&#160; &#160;&#160;&#160; drag:true, <br />&#160;&#160;&#160; &#160;&#160;&#160; modal:true, <br />&#160;&#160;&#160; &#160;&#160;&#160; url:&#39;setdata.php?s=2&#38;sid=&#39;+bb, <br />&#160;&#160;&#160; &#160;&#160;&#160; afterSubmit: function(server_data, posted_data) { <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; result = server_data.responseText.split(&#8221;;&#8221;); <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; //alert(result[1]); <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if (result[0] == &#8220;success&#8221;) <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; return [true,"",result[1]]; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; else return [false,"Error inserting row"]; <br />&#160;&#160;&#160; &#160;&#160;&#160; } <br />&#160;&#160;&#160; });&#160; <br />&#160;&#160;&#160; } <br />&#160;&#160;&#160; else { <br />&#160;&#160;&#160; &#160;&#160;&#160; alert(&#8221;Please select a school to add years to.&#8221;); <br />&#160;&#160;&#160; } <br />});</p>
<p>And this is the php used to update it:</p>
<p>&#8220;INSERT INTO `tblYears` (`Year_ID`,`Sch_ID`,`Year`) VALUES (NULL,&#39;&#8221;.$_GET[&#39;sid&#39;].&#8221;&#39;,&#39;&#8221;.$_POST[&#39;Year&#39;].&#8221;&#39;)&#8221;);</p>
<p>I can get the script to insert the row into the database, but the problem is with the getSelectedRow function. When I click to Add a year the alert displays the correct ID for the school. This is fine the first time, but if I select a different school then click to Add, the alert displays the correct ID, but the bb variable still contains the previously selected School.</p>
<p>It appears that the ID parsed using bb is retained from selecting the very first school, all years will then be inserted into the first selected school.</p>
<p>Am I missing something here? I&#39;m racking my brain trying to figure this out.</p></p>
]]></description>
        	        	<pubDate>Fri, 27 Jun 2008 06:57:24 +0300</pubDate>
        </item>
</channel>
</rss>