﻿<?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 - Update Problem when using BatchUpdate method</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Update-Problem-when-using-BatchUpdate-method/</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>Update Problem when using BatchUpdate method</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Update-Problem-when-using-BatchUpdate-method/</link><pubDate>Tue, 30 Aug 2011 02:09:21 GMT</pubDate><dc:creator>gavin</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 11pt"&gt;Hello Handy , &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 11pt"&gt;&amp;nbsp; Thank you for your reply and help . I think I have solved this problem . Thank you very much !&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Update Problem when using BatchUpdate method</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Update-Problem-when-using-BatchUpdate-method/</link><pubDate>Mon, 29 Aug 2011 04:01:47 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;It would very helpfull if you can send a simple runable project that replicates the issue. We need this to investigate the issue.&lt;br /&gt;Also, in your code, I saw that you call invoke script to refresh WebGrid. I think this is no need to do because WebGrid would automatically refresh if after accept the pending changes in batch update.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>Update Problem when using BatchUpdate method</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Update-Problem-when-using-BatchUpdate-method/</link><pubDate>Fri, 26 Aug 2011 03:53:32 GMT</pubDate><dc:creator>gavin</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 11pt"&gt;Hi , &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 11pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I meet a problem when using BatchUpdate method to update data of webgrid . It is a alert said "Unable to find the record in the datasource" . However ,&amp;nbsp; the data in the webgrid is updated and the data in the database is also updated . It means update success .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;   &lt;span style="font-size: 11pt"&gt; I do not know why was that . The following code is key code about BatchUpdate &lt;/span&gt;&lt;span style="font-size: 11pt"&gt;method .&lt;/span&gt;&lt;/p&gt;&lt;pre&gt; protected void WG1_BatchUpdate(object sender, BatchUpdateEventArgs e)
 {
       string TypeGuid="";
       foreach (WebGridRowChanges rowChanges in e.PendingChanges)
       {
            if (rowChanges.RowState == RowState.Modified)
            {
                 TypeGuid = rowChanges.KeyValue.ToString();
                 UpdateHandleType(rowChanges.Data, TypeGuid);
            }
       }

        WG1.ClientAction.InvokeScript("alert('Update Success!');ISGetObject('" &amp;#43; WG1.ClientID &amp;#43; "').Refresh();");
}&lt;/pre&gt;&lt;pre&gt;
&lt;p&gt;  private CommonDataRow UpdateHandleType(List&amp;lt;WebGridCellData&amp;gt; data, string typeGuid)&lt;br /&gt;{&lt;br /&gt;      CommonDataRow row = new CommonDataRow("Frame_WaitHandleTypes", "TypeGuid", typeGuid, "Frame_ConnectionString");&lt;br /&gt;      foreach (WebGridCellData cellData in data)&lt;br /&gt;      {&lt;br /&gt;         row[cellData.Column.DataMember] = cellData.NewValue;&lt;br /&gt;      }&lt;br /&gt;       row.Update();&lt;br /&gt;       return row;&lt;br /&gt;}&lt;br /&gt;&lt;/p&gt;&lt;/pre&gt;

&lt;p&gt;  &lt;span style="font-size: 11pt"&gt;The image in the attach file&amp;nbsp;is that alert .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;   &lt;span style="font-size: 11pt"&gt;Anyone can help me ? Thanks a lot !&lt;/span&gt;&lt;/p&gt;</description></item></channel></rss>