﻿<?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 - Undo Changes on ClientSideEvent "OnAddPendingChanges"</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Undo-Changes-on-ClientSideEvent-OnAddPendingChanges/</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>Undo Changes on ClientSideEvent "OnAddPendingChanges"</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Undo-Changes-on-ClientSideEvent-OnAddPendingChanges/</link><pubDate>Mon, 07 Dec 2009 10:35:25 GMT</pubDate><dc:creator>james</dc:creator><description>&lt;p&gt;Michael, &lt;/p&gt;&lt;p&gt;Okay, I think using the UndoChanges() method as you figured out originally should do it. But call it in a timeout, not in the synchronous execution.&lt;/p&gt;
&lt;p&gt;Example: &lt;/p&gt;
&lt;p&gt;setTimeout( function() { rowChange.Row.UndoChanges(); }, 10);&lt;/p&gt;
&lt;p&gt;Let me know if that works in your end.&lt;/p&gt;
&lt;p&gt;Hope this helps,&lt;br /&gt;James.&lt;/p&gt;</description></item><item><title>Undo Changes on ClientSideEvent "OnAddPendingChanges"</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Undo-Changes-on-ClientSideEvent-OnAddPendingChanges/</link><pubDate>Mon, 07 Dec 2009 01:25:12 GMT</pubDate><dc:creator>Michael</dc:creator><description>&lt;p&gt;Hi Yudi&lt;/p&gt;
&lt;p&gt;If i refresh grid, i lost all (deleted) row styles!&lt;/p&gt;
&lt;p&gt;Following situation:&lt;/p&gt;
&lt;p&gt;I want delete 2 rows&lt;/p&gt;
&lt;p&gt;First row can be deleted -&amp;gt; OnAddPendingChanges retruns true, row has "deleted row style"&lt;/p&gt;
&lt;p&gt;Second row can't be deleted -&amp;gt; OnAddPendingChanges retruns false (gird will be refreshed and all deleted row styles are cleared!&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;</description></item><item><title>Undo Changes on ClientSideEvent "OnAddPendingChanges"</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Undo-Changes-on-ClientSideEvent-OnAddPendingChanges/</link><pubDate>Sun, 06 Dec 2009 22:39:08 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Please try to use “Refresh” method in order to revert back the deleted row style of batch update into normal row when undo changes on client side event.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;The snippet code below is a simple sample that shows how to revert back the deleted row style of batch update into normal row when undo changes on client side event. The snippet code will prevent user to delete the original record of “Shippers” table of Northwind database. For more detail, please check the attached sample.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;function WebGrid1_OnAddPendingChanges(controlId, table, rowChange) {
    var WebGrid1 = ISGetObject(controlId);
    
    if (rowChange.RowState == "Deleted") {
        var CompanyName = rowChange.Row.GetCells().GetNamedItem("CompanyName").Text;
        var e = window.event;

        if (CompanyName == "Speedy Express" || CompanyName == "United Package" || CompanyName == "Federal Shipping") {
        rowChange.Row.UndoChanges();
        WebGrid1.Refresh();
                    
        return false;
        }
    }

    return true;
}&lt;/pre&gt;</description></item><item><title>Undo Changes on ClientSideEvent "OnAddPendingChanges"</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Undo-Changes-on-ClientSideEvent-OnAddPendingChanges/</link><pubDate>Sat, 05 Dec 2009 09:38:26 GMT</pubDate><dc:creator>Michael</dc:creator><description>&lt;p&gt;Hi James&lt;/p&gt;
&lt;p&gt;That doesn't work correctly. Please have a look on attached picture.&lt;/p&gt;
&lt;p&gt;I have deleted 3 rows. On last row i have return false. Pending Changes are correct, but the row is still red and the rowheader has change.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;</description></item><item><title>Undo Changes on ClientSideEvent "OnAddPendingChanges"</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Undo-Changes-on-ClientSideEvent-OnAddPendingChanges/</link><pubDate>Fri, 04 Dec 2009 23:31:19 GMT</pubDate><dc:creator>james</dc:creator><description>&lt;p&gt;Michael, have you tried to return false in the event? It should cancel the add changes process. &lt;/p&gt;</description></item><item><title>Undo Changes on ClientSideEvent "OnAddPendingChanges"</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Undo-Changes-on-ClientSideEvent-OnAddPendingChanges/</link><pubDate>Fri, 04 Dec 2009 03:46:39 GMT</pubDate><dc:creator>Michael</dc:creator><description>&lt;p&gt;Hi Yudi&lt;/p&gt;
&lt;p&gt;I’m currently use WebGrid Version 7.0.7200.306 and WebUI.NET Framework 3.0.5000.705.&lt;/p&gt;
&lt;p&gt;After &lt;strong&gt;&lt;em&gt;rowChange.Row.UndoChanges()&lt;/em&gt;&lt;/strong&gt;  the red Cross will be deleted, but the row is still red and the pending changes have not been updated as well.&lt;/p&gt;</description></item><item><title>Undo Changes on ClientSideEvent "OnAddPendingChanges"</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Undo-Changes-on-ClientSideEvent-OnAddPendingChanges/</link><pubDate>Fri, 04 Dec 2009 03:35:03 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;The “rowChange.Row.UndoChanges();” works on my end.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;I’m currently use WebGrid 7.0 build 308 and WebUI.NET Framework 3.0 build 706.&lt;br /&gt;Could you please let me know your currenct build version of WebGrid 7.0 and WebUI.NET Framework 3.0?&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Undo Changes on ClientSideEvent "OnAddPendingChanges"</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Undo-Changes-on-ClientSideEvent-OnAddPendingChanges/</link><pubDate>Thu, 03 Dec 2009 04:02:20 GMT</pubDate><dc:creator>Michael</dc:creator><description>&lt;p&gt;Hi &lt;/p&gt;
&lt;p&gt;I use ClientSideEvent "OnAddPendingChanges" for validation.&lt;/p&gt;
&lt;p&gt;How can i undo current changes? &lt;em&gt;rowChange.Row.UndoChanges()&lt;/em&gt; doesn't work!&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;</description></item></channel></rss>