﻿<?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 - Lounge - BatchUpdate in webgrid Issue when using SQL DataSource</title><link>http://www.intersoftsolutions.com/Community/Lounge/BatchUpdate-in-webgrid-Issue-when-using-SQL-DataSource/</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>BatchUpdate in webgrid Issue when using SQL DataSource</title><link>http://www.intersoftsolutions.com/Community/Lounge/BatchUpdate-in-webgrid-Issue-when-using-SQL-DataSource/</link><pubDate>Thu, 21 Aug 2014 23:41:53 GMT</pubDate><dc:creator>Hans</dc:creator><category>WebGrid</category><category>BatchUpdate</category><category>sqldatasource</category><description>&lt;p&gt;Hello,&lt;br&gt;&lt;br&gt;I am glad to hear that. Should you have further question, please do not hesitate to contact us.&lt;br&gt;&lt;br&gt;Thank you.&lt;br&gt;&lt;br&gt;Regards,&lt;br&gt;Hans K.&lt;br&gt;&lt;/p&gt;</description></item><item><title>BatchUpdate in webgrid Issue when using SQL DataSource</title><link>http://www.intersoftsolutions.com/Community/Lounge/BatchUpdate-in-webgrid-Issue-when-using-SQL-DataSource/</link><pubDate>Wed, 20 Aug 2014 04:33:21 GMT</pubDate><dc:creator>sample4170</dc:creator><category>WebGrid</category><category>BatchUpdate</category><category>sqldatasource</category><description>&lt;p&gt;Hi Hans,&lt;/p&gt;
&lt;p&gt;Your sample works and I've applied it to mine successfully. The issue was that in SQLDatasource, I was giving values' variables (@Roles) as (@Rls) tmp_variable in the UpdateCommand.&lt;/p&gt;
&lt;p&gt;Thanks alot for your Help.&lt;/p&gt;</description></item><item><title>BatchUpdate in webgrid Issue when using SQL DataSource</title><link>http://www.intersoftsolutions.com/Community/Lounge/BatchUpdate-in-webgrid-Issue-when-using-SQL-DataSource/</link><pubDate>Wed, 20 Aug 2014 03:29:32 GMT</pubDate><dc:creator>Hans</dc:creator><category>WebGrid</category><category>BatchUpdate</category><category>sqldatasource</category><description>&lt;p&gt;Hello,&lt;br&gt;&lt;br&gt;Thank you for the question.&lt;br&gt;&lt;br&gt;Based on your post, I try to modify one of WebGrid samples, “BindtoSqlDataSource.aspx” page.&lt;br&gt;I enabled WebGrid’s Batch Update feature and Allow Edit feature in this page.&lt;br&gt;And then I run the page in Internet Explorer 11, but unfortunately, it works fine on my end.&lt;br&gt;&lt;br&gt;I attached the modified page and video regarding the result on my end.&lt;br&gt;&lt;br&gt;Is it possible to you to modify the attached page, so that I can reproduce the issue on my end?&lt;br&gt;Or could you provide me the simple working sample that replicates the issue? So that I can investigate the issue furthers more.&lt;br&gt;&lt;br&gt;Thank you for your help.&lt;br&gt;&lt;br&gt;Regards,&lt;br&gt;Hans K.&lt;br&gt;&lt;/p&gt;</description></item><item><title>BatchUpdate in webgrid Issue when using SQL DataSource</title><link>http://www.intersoftsolutions.com/Community/Lounge/BatchUpdate-in-webgrid-Issue-when-using-SQL-DataSource/</link><pubDate>Tue, 19 Aug 2014 09:51:06 GMT</pubDate><dc:creator>sample4170</dc:creator><category>WebGrid</category><category>BatchUpdate</category><category>sqldatasource</category><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I am having a webgrid with SQL Datasource which allows BatchUpdate. I've written code behind using the samples given with the product.&lt;/p&gt;&lt;p&gt;Now, my issue is this: When a single row is updated, it affects the Physical DB and is reflected when refreshed, properly. But, when a set of rows are affected, in the code behind, the values are sent to the SQL Update Parameters correctly but the Physical DB is updated to have the last row change being applied to all those corresponding rows.&lt;/p&gt;&lt;p&gt;For eg., I am changing 2 rows' with column "ratio" = 76 and 85 respectively and update it. The code behind passes the value properly and the grid is showing the same. Once I press refresh, the DB shows BOTH those two rows to have "ratio" = 85.&lt;/p&gt;&lt;p&gt;My SQL update command is as usual normal: "Update table_name set ratio=@Ratio where ID=@Id";&lt;/p&gt;&lt;p&gt;SQL Update Parameters: @Ratio, @Id&lt;/p&gt;&lt;p&gt;SQL Update Parameter Values: ["Ratio"].DefaultValue = newValue;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ["Id"].DefaultValue = newValue; in switch according to column name;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;This all, I have given in OnBatchUpdate function and foreach PendingChanges; SQLDS.Update() is called for time. Is there anything wrong with this code? If it is taking the latest Default value, then the Key field should also be pointing to the latest row alone, meaning only one row is affected, right?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;Sample:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Id&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;Ratio&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;Override&lt;/p&gt;&lt;p&gt;1&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;90&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;true&lt;/p&gt;&lt;p&gt;2&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;100&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;true&lt;/p&gt;&lt;p&gt;After Update, my Physical DB is like this:&lt;/p&gt;&lt;p&gt;1&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;100&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;true&lt;/p&gt;&lt;p&gt;2&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;100&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;true&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;foreach row&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;"Id".defaultvalue = keyValue;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;foreach column_changed_data&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;tmp_ratio = newvalue if column = "Ratio"&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;tmp_override = newValue if column = "Override"&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;end loop;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;if override = "true"&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;"Ratio".Defaultvalue = tmp_ratio&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;"Override".DefaultValue = tmp_override&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;else&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;"Override".DefaultValue = tmp_override&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;SQL.update();&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;endloop;&lt;/p&gt;&lt;p&gt;I really appreciate the help. Thanks!&lt;/p&gt;</description></item></channel></rss>