<?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: OnRowChange event</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/onrowchange-event</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/onrowchange-event/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Pete on OnRowChange event</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/onrowchange-event#p15160</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/onrowchange-event#p15160</guid>
        	        	<description><![CDATA[<p>STILL hoping to see this in a future release (still waiting)!</p>
]]></description>
        	        	<pubDate>Thu, 25 Feb 2010 19:22:05 +0200</pubDate>
        </item>
        <item>
        	<title>Pete on OnRowChange event</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/onrowchange-event#p11158</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/onrowchange-event#p11158</guid>
        	        	<description><![CDATA[<p>Yes, I agree that a common solution would be great</p>
<p>The challenge has been the timing of "trapping" of the row change.&#160; I have been using the onSelectRow event to compare the row id&#39;s and retrieve the contents of the *last* selected row and update the database on the server.&#160; The code I call looks like this:</p>
</p>
<p>function saveGridRecord(gridName,lastRec,editURL){<br />var savedRowData;<br />// Theoretically the saved row data should be available, get it.</p>
<p>&#160;&#160;&#160; &#160;&#160;&#160;&#160; var mySavedRow = $(gridName).getGridParam(&#39;savedRow&#39;);<br />&#160;&#160;&#160; &#160;&#160;&#160; var rownumsaved = mySavedRow.length - 1;<br />&#160;&#160;&#160; &#160;&#160;&#160; if(rownumsaved &#62;=0)<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var rowData = mySavedRow[rownumsaved];<br />&#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; if(rowData)<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; savedRowData = rowToString(rowData);</p>
<p>&#160;&#160;&#160; &#160;&#160;&#160; $(gridName).saveRow(lastRec,saveRowCheck,editURL,{&#39;extras&#39;:savedRowData});<br />&#160;&#160;&#160; &#160;&#160;&#160; <br />}</p>
</p>
<p>The work is in formatting the data so it can be compared easily and right now I pass it to the server in the "extras" parameter to compare and *then* update the database if there is a change.&#160; If jqgrid already had the &#39;before&#39; and &#39;after&#39; data formatted the same then I could do a quick compare in javascript and only make the roundtrip to the server if it has changed. In fact, if the event raised was onRowChange, I wouldn&#39;t have to do the compare on the rows at all, jqGrid would do the compare and only raise the event if the data changed.&#160; That saves a great deal of work for me.&#160; If there is a change, raise the event with the before and after snapshots and then let me handle the details on what to do with the differences.</p>
<p>Thanks for thinking about doing this.&#160; It would be a great help and make my code much more efficient.&#160; I&#39;ll be happy to test, prototype, document or do whatever you need to make this happen.</p>
</p>
<p>Pete</p>
]]></description>
        	        	<pubDate>Tue, 27 Oct 2009 14:36:48 +0200</pubDate>
        </item>
        <item>
        	<title>tony on OnRowChange event</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/onrowchange-event#p11103</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/onrowchange-event#p11103</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>This have sense. Not promiese if I will do something in 3.6 final for this.</p>
<p>Regards</p>
<p>Tony</p>
<p>P.S we should have a common solution for all editing modules.</p></p>
]]></description>
        	        	<pubDate>Tue, 27 Oct 2009 02:27:23 +0200</pubDate>
        </item>
        <item>
        	<title>Pete on OnRowChange event</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/onrowchange-event#p11059</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/onrowchange-event#p11059</guid>
        	        	<description><![CDATA[<p>All my grids are inline edits.&#160; My biggest challenge is detecting when the data in any one of the cells has changed which would indicate that I need to update the data on the server.&#160; Right now I have to use a combination of .getGridParam(&#39;savedRow&#39;) and .saveRow and then examine all the cell data passed in both records to see if anything has changed before I make a roundtrip to the server to update the data.&#160; If an event were triggered when the data in any one of the cells changed AND the format of the data in both saveRow and getGridParam(&#39;savedRow&#39;) were the same, it would be easier to manage inline editing changes.</p>
</p>
<p>Better would be an OnRowChange event that would pass a rowid and two objects: The before and the after row objects. That would make trapping changes easy!&#160; Seems to me most of that functionality is already there.&#160; Just need to raise the event and pass the extra object.</p>
</p>
<p>Thanks,</p>
<p>Pete</p></p>
]]></description>
        	        	<pubDate>Sat, 24 Oct 2009 16:36:32 +0300</pubDate>
        </item>
</channel>
</rss>