<?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, succesfunc is not called on editing a row ....</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row</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/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on inline edit, succesfunc is not called on editing a row ....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19853</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19853</guid>
        	        	<description><![CDATA[<p>HEllo,</p>
<p>Since the bug can not be reproduced from me - please send a link to the problem.</p>
<p>Thank you</p>
</p>
<p>Kind Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sat, 18 Sep 2010 11:57:42 +0300</pubDate>
        </item>
        <item>
        	<title>Trober on inline edit, succesfunc is not called on editing a row ....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19839</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19839</guid>
        	        	<description><![CDATA[<p>Still no reply?? &#160;<img class="spSmiley" style="margin:0" title="Cry" src="/blog/wp-content/forum-smileys/sf-cry.gif" alt="Cry" /></p>
]]></description>
        	        	<pubDate>Fri, 17 Sep 2010 17:23:16 +0300</pubDate>
        </item>
        <item>
        	<title>Trober on inline edit, succesfunc is not called on editing a row ....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19801</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19801</guid>
        	        	<description><![CDATA[<p>No reply yet? &#160; <img class="spSmiley" style="margin:0" title="Frown" src="/blog/wp-content/forum-smileys/sf-frown.gif" alt="Frown" /></p>
]]></description>
        	        	<pubDate>Wed, 15 Sep 2010 23:42:04 +0300</pubDate>
        </item>
        <item>
        	<title>Trober on inline edit, succesfunc is not called on editing a row ....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19783</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19783</guid>
        	        	<description><![CDATA[<p>I debugged this and found grid.inlinedit.js line 184 *loses* the definition of successfunc on second call. &#160; <img class="spSmiley" style="margin:0" title="Surprised" src="/blog/wp-content/forum-smileys/sf-surprised.gif" alt="Surprised" /></p>
<p>Lines 182-184 of grid.inlinedit.js:</p>
<p>&#160;&#160; &#160; if (stat === "success"){</p>
<div id="sb13-L183" class="sourceRow">&#160;&#160; &#160; &#160; &#160; var ret;</div>
<div id="sb13-L184" class="sourceRow">&#160;&#160; &#160; &#160; &#160; if( $.isFunction(succesfunc)) { ret = succesfunc(res);}</div>
<div id="sb13-L185" class="sourceRow"></div>
<p>First-time call, successfunc has definition and is called.</p>
<p>Second-time call, successfunc is "undefined".</p>
<p>Same request to server; same response from server! &#160;&#160;</p>
</p>
<p>Is there bug? &#160;</p>
]]></description>
        	        	<pubDate>Wed, 15 Sep 2010 00:38:49 +0300</pubDate>
        </item>
        <item>
        	<title>tony on inline edit, succesfunc is not called on editing a row ....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19509</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19509</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>For me is strange too.</p>
</p>
<p>Kind Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 03 Sep 2010 09:37:55 +0300</pubDate>
        </item>
        <item>
        	<title>mikesmith on inline edit, succesfunc is not called on editing a row ....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19395</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19395</guid>
        	        	<description><![CDATA[<p>Hi Tony</p>
</p>
<p>I tried your suggestion but still the same problem.</p>
</p>
<p>I copied that logic you said could be the problem in your previous post from the jqGrid wiki at:</p>
<p><a rel="nofollow" href="/jqgridwiki/doku.php?id=wiki:inline_editing" target="_blank"></a><a href="http://www.trirand.com/jqgridw" rel="nofollow" target="_blank">http://www.trirand.com/jqgridw</a>.....ne_editing</p>
</p>
<p>Its very interesting why this problem happens!</p></p>
]]></description>
        	        	<pubDate>Fri, 27 Aug 2010 22:21:13 +0300</pubDate>
        </item>
        <item>
        	<title>tony on inline edit, succesfunc is not called on editing a row ....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19374</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19374</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I think that everthing is in this logic:</p>
<p>&#160;&#160;&#160; if(id &#38;&#38; id!==lastsel){<br />&#160;&#160;&#160;&#160;&#160;jQuery("#gridedittable").jqGrid(&#39;restoreRow&#39;,lastsel);<br />&#160;&#160;&#160;&#160;&#160;jQuery("#gridedittable").jqGrid(&#39;editRow&#39;,id,true,null,successFuncStandardGrid);<br />&#160;&#160;&#160;&#160;&#160;lastsel=id;<br />&#160;&#160;&#160;&#160;}</p>
</p>
<p>Try this</p>
<p>if(id){</p>
<p>...</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 27 Aug 2010 18:59:24 +0300</pubDate>
        </item>
        <item>
        	<title>mikesmith on inline edit, succesfunc is not called on editing a row ....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19364</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19364</guid>
        	        	<description><![CDATA[<p>Hi Tony</p>
<p>I have just proved this problem also on the plugin I talked about earlier in my previous post. At least thats good news and it means that its not only in my application but can occur in other applications.</p>
</p>
<p>Do you suggest I put in this bug also in the struts2-jquery plugin forum? I dont want to confuse this by putting it in 2 places.</p>
<p>All I did to prove my post was that onSelectRow, I call this below(I ensure that for every eidt I call my successFuncStandardGrid and always return false). Again the 1st time, the row doesnt update as this function returns false. But next time I edit the same row, this function doesnt get called and updates the row.</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3919' value='Select Code' data-codeid='sfcode3919' /></p>
<div class='sfcode' id='sfcode3919'>
<p>&#160;&#160;&#160;&#160; var lastsel;<br />&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160; $.subscribe(&#39;rowselectStandardGrid&#39;, function(){<br />&#160;&#160;&#160;&#160;var id = jQuery(&#34;#gridedittable&#34;).jqGrid(&#39;getGridParam&#39;,&#39;selrow&#39;);<br />&#160;&#160;&#160;&#160;<br />&#160;&#160;&#160;&#160;if(id &#38;&#38; id!==lastsel){<br />&#160;&#160;&#160;&#160;&#160;jQuery(&#34;#gridedittable&#34;).jqGrid(&#39;restoreRow&#39;,lastsel);<br />&#160;&#160;&#160;&#160;&#160;jQuery(&#34;#gridedittable&#34;).jqGrid(&#39;editRow&#39;,id,true,null,successFuncStandardGrid);<br />&#160;&#160;&#160;&#160;&#160;lastsel=id;<br />&#160;&#160;&#160;&#160;}<br />&#160;&#160;&#160;});</p>
<p>&#160;&#160;&#160;function successFuncStandardGrid(data){<br />&#160;&#160;&#160;&#160;alert(&#39;successfunctionstandardgrid: will return false&#39;);<br />&#160;&#160;&#160;&#160;return false;<br />&#160;&#160;&#160;}</p>
</p>
</div>
<p>I await your advice.</p></p>
]]></description>
        	        	<pubDate>Fri, 27 Aug 2010 16:12:12 +0300</pubDate>
        </item>
        <item>
        	<title>mikesmith on inline edit, succesfunc is not called on editing a row ....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19363</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19363</guid>
        	        	<description><![CDATA[<p>Hi Tony</p>
</p>
<p>I understand about if you do every test case you will be in trouble 🙂</p>
</p>
<p>I dont really have a live system I can give you an example of. I do use the Struts2 Jquery plugin which makes use of jqgrid and is located here:</p>
<p><a href="http://www.weinfreund.de/struts2-jquery-showcase/index.action" rel="nofollow" target="_blank"><a href="http://www.weinfreund.de/strut" rel="nofollow">http://www.weinfreund.de/strut</a>.....dex.action</a></p>
<p>However I dont think its a plugin issue because I do call jquery directly when this problem occurs.</p>
</p>
<p>The simple scenario that can be tested is that if one edits a row (in inline editing, I only use inline editing in all my grids) &#38; and error occurs its works fine the 1st time and the grid restores the data back because an error occurs. However if you dont click on any other row, but inline edit the exact same row immediately, If an error occurs on the server, my grid takes no notice of this error and simply saves the data on client grid(even though server has failed).</p>
</p>
<p>In the mean time, I have downloaded the last struts2-jquery plugin example war and I want to see if I can replicate this problem on it.&#160; If I can, I will update you here. But this is potentially a critical issue.</p>
</p>
<p>thanks &#38; regards</p></p>
]]></description>
        	        	<pubDate>Fri, 27 Aug 2010 15:39:50 +0300</pubDate>
        </item>
        <item>
        	<title>tony on inline edit, succesfunc is not called on editing a row ....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19303</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19303</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Humm very interesting.</p>
<p>Sorry to say this, but If I do all the test cases described from the user problems I will not have time to sleep <img class="spSmiley" style="margin:0" title="Wink" src="/blog/wp-content/forum-smileys/sf-wink.gif" alt="Wink" />.</p>
<p>Please in order to localize the problem, prepare a exmple and send me a link. I my opinion this is not a jqGrid problem, but without proof I&#39;m not sure about this</p>
</p>
<p>Kind Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 25 Aug 2010 17:55:41 +0300</pubDate>
        </item>
        <item>
        	<title>mikesmith on inline edit, succesfunc is not called on editing a row ....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19191</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19191</guid>
        	        	<description><![CDATA[<p>Hi Tony</p>
</p>
<p>I have just checked and I basically send the exact same request and I get back the exact same response from the server.</p>
</p>
<p>1st response which calls successfunc:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9686' value='Select Code' data-codeid='sfcode9686' /></p>
<div class='sfcode' id='sfcode9686'>{&#34;gridModel&#34;:null,&#34;message&#34;:&#34;Error: Editing Document Phase START. This Phase Already exists.&#34;,&#34;page&#34;:0,&#34;phase&#34;:{&#34;phaseId&#34;:null,&#34;phaseName&#34;:&#34;START&#34;,&#34;projectId&#34;:null},&#34;phaseList&#34;:[],&#34;phaseName&#34;:null,&#34;phaseNameHeader&#34;:null,&#34;records&#34;:0,&#34;total&#34;:0}</div>
<p>since message starts with Error, I know its an error and then I will return false(this means my message is displayed and row edited is restored to original value)</p>
<p>2nd response which does not call successfunc after editing the same cell immediately after:&#160;</p>
<p><input type='button' class='sfcodeselect' name='sfselectit978' value='Select Code' data-codeid='sfcode978' /></p>
<div class='sfcode' id='sfcode978'>
<p>{&#34;gridModel&#34;:null,&#34;message&#34;:&#34;Error: Editing Document Phase START. This Phase Already exists.&#34;,&#34;page&#34;:0,&#34;phase&#34;:{&#34;phaseId&#34;:null,&#34;phaseName&#34;:&#34;START&#34;,&#34;projectId&#34;:null},&#34;phaseList&#34;:[],&#34;phaseName&#34;:null,&#34;phaseNameHeader&#34;:null,&#34;records&#34;:0,&#34;total&#34;:0}</p>
</div>
<p>I also return an error from this request,&#160;however the row edited is NOT restored to its original value but to the new value which is&#160;incorrect(because successfunc should return false, but it obviously doesnt.)</p>
</p>
<p>I even tried renaming my successFuncStandardGrid to just successfunc but it still didnt work.</p>
<p>This problem only happens when I do consecutive editing of the same row. I wonder if some value is being cached and only re-sets when its a different row.</p>
<p>Is there anyway you can test the scenario I described to see if you can reproduce it?</p>
</p>
<p>many thanks</p>
]]></description>
        	        	<pubDate>Wed, 18 Aug 2010 14:34:56 +0300</pubDate>
        </item>
        <item>
        	<title>tony on inline edit, succesfunc is not called on editing a row ....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19169</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19169</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>It depend maybe what you return from server when the row is edited for second time.</p>
<p>Please check this. Her is the code sniplet for this event:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit580' value='Select Code' data-codeid='sfcode580' /></p>
<div class='sfcode' id='sfcode580'>
<p>&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; if (stat === "success"){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;var ret;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if( $.isFunction(succesfunc)) { ret = succesfunc.call($t, res);}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;else { ret = true; }<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if (ret===true) {</p>
<p>&#160;.....................................................<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; if(fr &#62;= 0) { $t.p.savedRow.splice(fr,1); }<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if( $.isFunction(aftersavefunc) ) { aftersavefunc.call($t, rowid,res); }<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;} else {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $($t).jqGrid("restoreRow",rowid, afterrestorefunc);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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; }</p>
</div>
<p>I hope you can check this.</p>
</p>
<p>Kind Regards</p>
<p>Tony&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;</p>
]]></description>
        	        	<pubDate>Tue, 17 Aug 2010 22:44:52 +0300</pubDate>
        </item>
        <item>
        	<title>mikesmith on inline edit, succesfunc is not called on editing a row ....</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19144</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/inline-edit-succesfunc-is-not-called-on-editing-a-row#p19144</guid>
        	        	<description><![CDATA[<p>I think there could be a bug with the editRow method and calling the succesfunc.</p>
</p>
<p>In inline editing, when I edit a row for the 1st time, successfunc is called &#38; I display my message returned from the server. Which is perfect. However, if I edit the same row again immediately, successfunc is not called. If I edit a different row, successfunc is called.&#160; So to recap, iff its the same row being edited, it gets called ony the first time &#38; never again, unless I edit a different row. This is therefore a bug.</p>
</p>
<p>When I do inline edit I have as follows:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4349' value='Select Code' data-codeid='sfcode4349' /></p>
<div class='sfcode' id='sfcode4349'>
<p>&#160;&#160; &#160;&#160;&#160;&#160; $.subscribe(&#39;rowselectStandardGrid&#39;, function(){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;var id = jQuery(&#34;#&#34;+gridName).jqGrid(&#39;getGridParam&#39;,&#39;selrow&#39;);</p>
<p>&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if(id &#38;&#38; id!==lastsel){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery(&#34;#&#34;+gridName).jqGrid(&#39;restoreRow&#39;,lastsel);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery(&#34;#&#34;+gridName).jqGrid(&#39;editRow&#39;,id,true,null,successFuncStandardGrid);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;lastsel=id;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;});</p>
<p>&#160;&#160; &#160;&#160;&#160;&#160; function successFuncStandardGrid(data){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;var message = JSON.parse(data.responseText).message;<br />&#160;&#160; &#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;return displayMessage(message, &#39;messageDiv&#39;);<br />&#160;&#160; &#160;&#160;&#160; &#160;}</p>
</div>
]]></description>
        	        	<pubDate>Sun, 15 Aug 2010 23:49:27 +0300</pubDate>
        </item>
</channel>
</rss>