﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - Webgrid - How to undo changes for certain cell values on a row?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid---How-to-undo-changes-for-certain-cell-values-on-a-row/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Webgrid - How to undo changes for certain cell values on a row?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid---How-to-undo-changes-for-certain-cell-values-on-a-row/</link><pubDate>Mon, 08 Mar 2010 21:53:53 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Hi Jocelyn,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Sorry for the inconvenience, however, you can ask for the feature request at "Developer Networked -&amp;gt; Community Center -&amp;gt; Product Feedback -&amp;gt; Feature Request". I hope it helps. Thank you and have a nice day.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Webgrid - How to undo changes for certain cell values on a row?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid---How-to-undo-changes-for-certain-cell-values-on-a-row/</link><pubDate>Mon, 08 Mar 2010 10:31:55 GMT</pubDate><dc:creator>jcrendulic</dc:creator><description>&lt;p&gt;The problem is that I do not want to call the controlid.AcceptAllChanges().  This would make a call to the server side BatchUpdate method, which should not be called because it would save all changes that a user has made on the grid without them physically hitting the Save button.  So, this is not an acceptable solution.  &lt;/p&gt;
&lt;p&gt;How do I request this as a feature enhancement?&lt;/p&gt;</description></item><item><title>Webgrid - How to undo changes for certain cell values on a row?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid---How-to-undo-changes-for-certain-cell-values-on-a-row/</link><pubDate>Mon, 01 Mar 2010 02:20:14 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Hi Jocelyn,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Here is a new snippet. Hopefully it will meet your scenario. If i am not mistaken, you want to set the value back to its original before the value goes to BatchUpDate. The problem is occurred because we are using BatchUpdate, it will hold the value first and all the changes will be made when we accept all changes. So, eventhough we set value to the old value, it will not change if the accept is not be made.&lt;/span&gt;&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;&lt;span style="font-size: 9pt; "&gt;function WebGrid1_OnEndRowEditing(controlId, row)
        {
            var controlId = ISGetObject("WebGrid1");
            var maxValue = 10;


            if (row.GetCells().GetNamedItem("UnitPrice").Get("Value") &amp;gt; maxValue)
            {
                row.GetCells().GetNamedItem("UnitPrice").SetValue(row.GetCells().GetNamedItem("UnitPrice").Get("OldValue"), true);
                controlId.AcceptAllChanges();

            }
            else
            {
                row.GetCells().GetNamedItem("UnitPrice").SetValue(row.GetCells().GetNamedItem("UnitPrice").Get("Value"), true);
            }

            return true;
        }&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; I hope it helps. Thank you and have a nice day.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>Webgrid - How to undo changes for certain cell values on a row?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid---How-to-undo-changes-for-certain-cell-values-on-a-row/</link><pubDate>Fri, 26 Feb 2010 12:33:05 GMT</pubDate><dc:creator>jcrendulic</dc:creator><description>&lt;p&gt;I ran your example and it does not set the cell back to the orginal value at all when I enter a value greater than 10. &lt;/p&gt;&amp;nbsp;The pending changes also shows the new changes.</description></item><item><title>Webgrid - How to undo changes for certain cell values on a row?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid---How-to-undo-changes-for-certain-cell-values-on-a-row/</link><pubDate>Fri, 26 Feb 2010 12:33:04 GMT</pubDate><dc:creator>jcrendulic</dc:creator><description>&lt;p&gt;It does not set the cell back to the orginal value at all when I enter a value greater than 10. &lt;/p&gt;&amp;nbsp;The pending </description></item><item><title>Webgrid - How to undo changes for certain cell values on a row?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid---How-to-undo-changes-for-certain-cell-values-on-a-row/</link><pubDate>Fri, 26 Feb 2010 12:33:02 GMT</pubDate><dc:creator>jcrendulic</dc:creator><description>&lt;p&gt;It does not set the cell back to the orginal value at all when I enter a value greater than 10. &lt;/p&gt;&amp;nbsp;The pending changes </description></item><item><title>Webgrid - How to undo changes for certain cell values on a row?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid---How-to-undo-changes-for-certain-cell-values-on-a-row/</link><pubDate>Fri, 26 Feb 2010 12:33:00 GMT</pubDate><dc:creator>jcrendulic</dc:creator><description>&lt;p&gt;It does not set the cell back to the orginal value at all when I enter a value greater than 10. &lt;/p&gt;&amp;nbsp;The pending changes also shows </description></item><item><title>Webgrid - How to undo changes for certain cell values on a row?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid---How-to-undo-changes-for-certain-cell-values-on-a-row/</link><pubDate>Fri, 26 Feb 2010 12:32:58 GMT</pubDate><dc:creator>jcrendulic</dc:creator><description>&lt;p&gt;It does not set the cell back to the orginal value at all when I enter a value greater than 10. &lt;/p&gt;&amp;nbsp;The pending changes also </description></item><item><title>Webgrid - How to undo changes for certain cell values on a row?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid---How-to-undo-changes-for-certain-cell-values-on-a-row/</link><pubDate>Fri, 26 Feb 2010 12:32:57 GMT</pubDate><dc:creator>jcrendulic</dc:creator><description>&lt;p&gt;It does not set the cell back to the orginal value at all when I enter a value greater than 10. &lt;/p&gt;&amp;nbsp;</description></item><item><title>Webgrid - How to undo changes for certain cell values on a row?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid---How-to-undo-changes-for-certain-cell-values-on-a-row/</link><pubDate>Fri, 26 Feb 2010 12:32:55 GMT</pubDate><dc:creator>jcrendulic</dc:creator><description>&lt;p&gt;It does not set the cell back to the orginal value at all when I enter a value greater than 10. &lt;/p&gt;&amp;nbsp;The </description></item><item><title>Webgrid - How to undo changes for certain cell values on a row?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid---How-to-undo-changes-for-certain-cell-values-on-a-row/</link><pubDate>Thu, 14 Jan 2010 12:06:16 GMT</pubDate><dc:creator>jcrendulic</dc:creator><description>&lt;p&gt;I have a webgrid that I need to validate after they click off the row.  Is there a way to undo changes for just certain cell values?  I have tried row.UndoChanges(); but that will undo everything for the whole row.   Is there some property like...&lt;/p&gt;
&lt;p&gt;If (valid == false){&lt;span style="font-size: 13px"&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 13px"&gt;&lt;/span&gt;row.GetCells().GetNamedItem(&lt;span style="font-size: 13px; color: #a31515"&gt;&lt;span style="font-size: 13px; color: #a31515"&gt;"Column1"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px"&gt;).UndoChanges();&lt;/span&gt; &lt;span style="font-size: 13px"&gt;
&lt;p&gt;row.GetCells().GetNamedItem(&lt;span style="font-size: 13px; color: #a31515"&gt;&lt;span style="font-size: 13px; color: #a31515"&gt;"Column2"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px"&gt;).UndoChanges();&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 13px"&gt;}&lt;/span&gt; &lt;/p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;row.GetCells().GetNamedItem(&lt;span style="font-size: 13px; color: #a31515"&gt;&lt;span style="font-size: 13px; color: #a31515"&gt;"Column2"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px"&gt;).UndoChanges();&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 13px"&gt;}&lt;/span&gt; &lt;/p&gt;</description></item></channel></rss>