﻿<?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 - Possible Bug - Can't add/delete record if UseValueListForSorting=Yes (with grouped columns)</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Possible-Bug---Cant-adddelete-record-if-UseValueListForSortingYes-with-grouped-columns/</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>Possible Bug - Can't add/delete record if UseValueListForSorting=Yes (with grouped columns)</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Possible-Bug---Cant-adddelete-record-if-UseValueListForSortingYes-with-grouped-columns/</link><pubDate>Thu, 15 Oct 2009 02:58:02 GMT</pubDate><dc:creator>Michael</dc:creator><category>Batch Update</category><category>Grouping</category><description>&lt;p&gt;Thanks for the additional note.&lt;/p&gt;
&lt;p&gt;I am very grateful for such advice!&lt;/p&gt;</description></item><item><title>Possible Bug - Can't add/delete record if UseValueListForSorting=Yes (with grouped columns)</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Possible-Bug---Cant-adddelete-record-if-UseValueListForSortingYes-with-grouped-columns/</link><pubDate>Thu, 15 Oct 2009 01:57:05 GMT</pubDate><dc:creator>technical@intersoftpt.com</dc:creator><category>Batch Update</category><category>Grouping</category><description>&lt;blockquote&gt;&lt;p&gt;Hello Michael,&lt;/p&gt;&lt;p&gt;Thank you for pointing out the issue in this scenario.&lt;/p&gt;&lt;p&gt;We have been able to replicate your problem with the exact error message you reported, and will fix it in the upcoming hotfix.&lt;/p&gt;&lt;p&gt;The work item # is 431 for your tracking reference.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;As an additional note for the complete solution, you'll need to clear the cached data source upon the data update process to avoid data-locking issue that may happen during the batch update process. This is only required if you're binding to datasource object through InitializeDataSource event.&lt;/p&gt;
&lt;p&gt;For example,&lt;/p&gt;&lt;pre&gt;protected void grdProductLine_BatchUpdate(object sender, BatchUpdateEventArgs e)
        {
            DataRowState rs = DataRowState.Added | DataRowState.Deleted;
            DataSet dsModified = ((DataSet)grdProductLine.GetCachedDataSource()).GetChanges(rs);
            if (dsModified != null)
            {
                PutDataMaintenanceProductLine(dsModified);
                &lt;span style="color: #c00000"&gt;grdProductLine.ClearCachedDataSource(); // clear data cache after update&lt;/span&gt;
            }
        }&lt;/pre&gt;
&lt;p&gt;Note: You'll need to apply the above codes _in addition_ to applying the upcoming hotfix. &lt;/p&gt;</description></item><item><title>Possible Bug - Can't add/delete record if UseValueListForSorting=Yes (with grouped columns)</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Possible-Bug---Cant-adddelete-record-if-UseValueListForSortingYes-with-grouped-columns/</link><pubDate>Thu, 15 Oct 2009 01:08:29 GMT</pubDate><dc:creator>technical@intersoftpt.com</dc:creator><category>Batch Update</category><category>Grouping</category><description>&lt;p&gt;Hello Michael,&lt;/p&gt;
&lt;p&gt;Thank you for pointing out the issue in this scenario.&lt;/p&gt;
&lt;p&gt;We have been able to replicate your problem with the exact error message you reported, and will fix it in the upcoming hotfix.&lt;/p&gt;
&lt;p&gt;The work item # is 431 for your tracking reference.&lt;/p&gt;</description></item><item><title>Possible Bug - Can't add/delete record if UseValueListForSorting=Yes (with grouped columns)</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Possible-Bug---Cant-adddelete-record-if-UseValueListForSortingYes-with-grouped-columns/</link><pubDate>Tue, 06 Oct 2009 10:06:03 GMT</pubDate><dc:creator>Michael</dc:creator><category>Batch Update</category><category>Grouping</category><description>&lt;p&gt;The code was always executed!&lt;/p&gt;
&lt;p&gt;Thanks for tip.&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;</description></item><item><title>Possible Bug - Can't add/delete record if UseValueListForSorting=Yes (with grouped columns)</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Possible-Bug---Cant-adddelete-record-if-UseValueListForSortingYes-with-grouped-columns/</link><pubDate>Tue, 06 Oct 2009 08:47:24 GMT</pubDate><dc:creator>james</dc:creator><category>Batch Update</category><category>Grouping</category><description>&lt;p&gt;Michael,&lt;/p&gt;&lt;p&gt;Make sure your column-level initialization codes are not inside !IsPostBack or other conditions. That means, those codes should always be executed during PrepareDataBinding.&lt;/p&gt;
&lt;p&gt;Hope this helps,&lt;br /&gt;James.&lt;/p&gt;</description></item><item><title>Possible Bug - Can't add/delete record if UseValueListForSorting=Yes (with grouped columns)</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Possible-Bug---Cant-adddelete-record-if-UseValueListForSortingYes-with-grouped-columns/</link><pubDate>Tue, 06 Oct 2009 08:12:19 GMT</pubDate><dc:creator>Michael</dc:creator><category>Batch Update</category><category>Grouping</category><description>&lt;p&gt;Now I set the property on the individual column (in PrepareDataBinding Event), but i get the same error message!&lt;/p&gt;&lt;pre&gt;            WebGridColumn Dependencies = grd.RootTable.Columns[0];
            WebGridColumn ID = grd.RootTable.Columns[1];
            WebGridColumn ProductID = grd.RootTable.Columns[2];
            WebGridColumn AttributeID = grd.RootTable.Columns[3];
            WebGridColumn Setpoint = grd.RootTable.Columns[4];
            WebGridColumn Min = grd.RootTable.Columns[5];
            WebGridColumn Max = grd.RootTable.Columns[6];
            WebGridColumn FormatID = grd.RootTable.Columns[7];
            WebGridColumn ValueIndex = grd.RootTable.Columns[8];

            Dependencies.UseValueListForSorting = ValueListSorting.No;
            ID.UseValueListForSorting = ValueListSorting.No;
            ProductID.UseValueListForSorting = ValueListSorting.Yes;
            AttributeID.UseValueListForSorting = ValueListSorting.Yes;
            Setpoint.UseValueListForSorting = ValueListSorting.No;
            Min.UseValueListForSorting = ValueListSorting.No;
            Max.UseValueListForSorting = ValueListSorting.No;
            FormatID.UseValueListForSorting = ValueListSorting.Yes;
            ValueIndex.UseValueListForSorting = ValueListSorting.No;&lt;/pre&gt;

&lt;p&gt;It's interesting that the data is still inserted into the database!&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;</description></item><item><title>Possible Bug - Can't add/delete record if UseValueListForSorting=Yes (with grouped columns)</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Possible-Bug---Cant-adddelete-record-if-UseValueListForSortingYes-with-grouped-columns/</link><pubDate>Tue, 06 Oct 2009 02:28:53 GMT</pubDate><dc:creator>Glayaar</dc:creator><category>Batch Update</category><category>Grouping</category><description>&lt;p&gt;We failed to open the Database you attach in the previous post. However, using the setting in the code we are able to replicate the issue in our environment. An issue report has been sent to our developer.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;In order to solve this issue, we suggest to set the UseValueListForSorting property on the individual column that has WebValueList. For example in the first sample the code used:&lt;/p&gt;&lt;pre&gt;grdObj.RootTable.Columns[1].UseValueListForSorting = ValueListSorting.Yes;&lt;br /&gt;grdObj.RootTable.Columns[2].UseValueListForSorting = ValueListSorting.Yes;&lt;/pre&gt;
&lt;p&gt;Instead of:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;pre&gt;grdObj.RootTable.UseValueListForSorting = ValueListSorting.Yes;&lt;/pre&gt;</description></item><item><title>Possible Bug - Can't add/delete record if UseValueListForSorting=Yes (with grouped columns)</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Possible-Bug---Cant-adddelete-record-if-UseValueListForSortingYes-with-grouped-columns/</link><pubDate>Fri, 02 Oct 2009 03:53:45 GMT</pubDate><dc:creator>Michael</dc:creator><category>Batch Update</category><category>Grouping</category><description>&lt;p&gt;Hi Glenn&lt;/p&gt;
&lt;p&gt;I send you Database-Backup (SQL Server 2008) file and my sample. I hope you can now replicate the issue.&lt;/p&gt;
&lt;p&gt;After changing Connectionstring you should be able to run the sample and get the error like my last post.&lt;/p&gt;
&lt;p&gt;In Event &lt;em&gt;&lt;strong&gt;grdProductLine_PrepareDataBinding&lt;/strong&gt;&lt;/em&gt; you can commenting out following line (samlpe run without error):&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;grdProductLine.RootTable.UseValueListForSorting = ValueListSorting.Yes;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thanks for help!&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;</description></item><item><title>Possible Bug - Can't add/delete record if UseValueListForSorting=Yes (with grouped columns)</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Possible-Bug---Cant-adddelete-record-if-UseValueListForSortingYes-with-grouped-columns/</link><pubDate>Thu, 01 Oct 2009 04:57:37 GMT</pubDate><dc:creator>Glayaar</dc:creator><category>Batch Update</category><category>Grouping</category><description>&lt;p&gt;Based on the sample created using the scenario you describe, the issue could not be replicated. Feel free to modify the sample in order to replicate the sample. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Possible Bug - Can't add/delete record if UseValueListForSorting=Yes (with grouped columns)</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Possible-Bug---Cant-adddelete-record-if-UseValueListForSortingYes-with-grouped-columns/</link><pubDate>Wed, 30 Sep 2009 04:41:01 GMT</pubDate><dc:creator>Michael</dc:creator><category>Batch Update</category><category>Grouping</category><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I have a table with 3 columns:&lt;/p&gt;
&lt;p&gt; - ID [GUID] autoincrement&lt;/p&gt;
&lt;p&gt; - LineID [GUID] foreignkey&lt;/p&gt;
&lt;p&gt; - ProductID [GUID] foreignkey&lt;/p&gt;
&lt;p&gt;For columns LineID and ProductID I use ValueLists.&lt;/p&gt;
&lt;p&gt;I set UseValueListForSorting = ValueListSorting.Yes because I want to sort by the DataTextField of Valuelist.&lt;/p&gt;
&lt;p&gt;If the data are not grouped I can add or delete rows without problems.&lt;/p&gt;
&lt;p&gt;But are the data grouped by LineID I get an errormessage like attached picture.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;</description></item></channel></rss>