﻿<?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 - AutoIncrement of KeyField giving problem in child tables</title><link>http://www.intersoftsolutions.com/Community/WebGrid/AutoIncrement-of-KeyField-giving-problem-in-child-tables/</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>AutoIncrement of KeyField giving problem in child tables</title><link>http://www.intersoftsolutions.com/Community/WebGrid/AutoIncrement-of-KeyField-giving-problem-in-child-tables/</link><pubDate>Wed, 09 Jun 2010 12:20:45 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><category>WebGrid</category><category>WebGrid BatchUpdate</category><category>WebGrid Enterprise</category><description>&lt;p&gt;Hi Huzefa,&lt;/p&gt;&lt;p&gt;Yes, a simple runable sample which replicate the issue should help us to investigate this. &lt;br /&gt;n our sample, we could not replicate your issue. &lt;br /&gt;I know that the select identity should correctly run after you accept the changes. &lt;br /&gt;But while in batch update, it should be handled automatically. &lt;br /&gt;As I remembered I ever told you that you must not use List in AutoIncrement scenario.&lt;br /&gt;&lt;a href="http://www.intersoftpt.com/Community/WebGrid/AutoIncrement-of-KeyField-giving-problem-when-record-already-exists/"&gt;http://www.intersoftpt.com/Community/WebGrid/AutoIncrement-of-KeyField-giving-problem-when-record-already-exists/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy &lt;/p&gt;</description></item><item><title>AutoIncrement of KeyField giving problem in child tables</title><link>http://www.intersoftsolutions.com/Community/WebGrid/AutoIncrement-of-KeyField-giving-problem-in-child-tables/</link><pubDate>Tue, 08 Jun 2010 10:46:41 GMT</pubDate><dc:creator>huzzy143</dc:creator><category>WebGrid</category><category>WebGrid BatchUpdate</category><category>WebGrid Enterprise</category><description>&lt;p&gt;Hi Handy,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;blockquote style="border-left: rgb(204,204,204) 1px solid; margin: 0px 0px 0px 5px; padding-left: 10px"&gt;&lt;p&gt;In our sample, we used the code below to handle it.&lt;/p&gt;&lt;/blockquote&gt;&lt;pre&gt;&lt;blockquote style="border-left: rgb(204,204,204) 1px solid; margin: 0px 0px 0px 5px; padding-left: 10px"&gt;&lt;pre&gt; int? identity = this.SelectIdentityQuery();
 OrderID = identity;&lt;/pre&gt;&lt;/blockquote&gt;&lt;/pre&gt;

&lt;p&gt;The above mentioned will be called when user has added few rows into the grid and then click the AcceptAllChanges button on WebGrid.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;But in case i am not able to add more then one row into the ChildTables of webGrid.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I am handling the update of Identity key once the user submits the Grid for Update.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I will also create a sample and send it to you..&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Huzefa&lt;/p&gt;</description></item><item><title>AutoIncrement of KeyField giving problem in child tables</title><link>http://www.intersoftsolutions.com/Community/WebGrid/AutoIncrement-of-KeyField-giving-problem-in-child-tables/</link><pubDate>Mon, 07 Jun 2010 15:51:54 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><category>WebGrid</category><category>WebGrid BatchUpdate</category><category>WebGrid Enterprise</category><description>&lt;p&gt;Hi Huzefa,&lt;/p&gt;&lt;p&gt;Yes, I saw the attached image. As I said before, you will need to handle to select identity when insert a new row.&lt;br /&gt;I think no matter what you used, as long as you hadle to select identity which will retrieve the current increment id.&lt;/p&gt;
&lt;p&gt;In our sample, we used the code below to handle it.&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt; int? identity = this.SelectIdentityQuery();
 OrderID = identity;&lt;/pre&gt;
&lt;p&gt;Here is the other article to do in &lt;a href="http://support.intersoftpt.com/KBArticle.aspx?aid=227" target="_blank"&gt;Sql&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;e.g try not to use BatchUpdate first. If you don't handle it, after you insert new row, try to remove the added row. It will surely return an error (incorrect id).&lt;/p&gt;
&lt;p /&gt;
&lt;p&gt;I see that you are using List as your strongly type custom object. I need to discuss to our developer if this is already supported or asked how to select identity in your scenario.&lt;br /&gt;&lt;br /&gt;It would be great if you can provide a simple runable sample. So when we debug it, we can know if it returns the correct id or not.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>AutoIncrement of KeyField giving problem in child tables</title><link>http://www.intersoftsolutions.com/Community/WebGrid/AutoIncrement-of-KeyField-giving-problem-in-child-tables/</link><pubDate>Mon, 07 Jun 2010 12:34:13 GMT</pubDate><dc:creator>huzzy143</dc:creator><category>WebGrid</category><category>WebGrid BatchUpdate</category><category>WebGrid Enterprise</category><description>&lt;p&gt;Hi handy,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Did u see the attached image file? The Auto-Increment is not happening at client side..&lt;/p&gt;
&lt;p&gt;I am trying to do a batch update. The key is not getting incremented that's why its doesn't allow me to add more then one row..&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;blockquote style="border-left: rgb(204,204,204) 1px solid; margin: 0px 0px 0px 5px; padding-left: 10px"&gt;&lt;/blockquote&gt;&lt;blockquote style="border-left: rgb(204,204,204) 1px solid; margin: 0px 0px 0px 5px; padding-left: 10px"&gt;&lt;p&gt;We have a sample in WebGrid sample called &lt;strong&gt;&lt;em&gt;BatchUpdate_Enterprise.aspx&lt;/em&gt;&lt;/strong&gt;. In child table (orders), we hanlde insert and select the identity with &lt;strong&gt;&lt;em&gt;DoInsert&lt;/em&gt;&lt;/strong&gt; method.&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;


&lt;p&gt;This sample is not so useful in my case as i am doing batch update using strongly typed custom objects and this sample use DataSource controls.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I want a sample where there is a batch update in Hierarchical Mode using Strongly Typed Custom Objects??&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Please help me out...&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Huzefa&lt;/p&gt;</description></item><item><title>AutoIncrement of KeyField giving problem in child tables</title><link>http://www.intersoftsolutions.com/Community/WebGrid/AutoIncrement-of-KeyField-giving-problem-in-child-tables/</link><pubDate>Mon, 07 Jun 2010 10:20:05 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><category>WebGrid</category><category>WebGrid BatchUpdate</category><category>WebGrid Enterprise</category><description>&lt;p&gt;Hi Huzefa,&lt;/p&gt;&lt;p&gt;Please let me try to help you. In you attached sample, there is nothing we can do because we don't have your database. As Yudi has mentioned, based on the article, you will need to handle to select the identity when insert new record.&lt;/p&gt;
&lt;p&gt;We have a sample in WebGrid sample called &lt;b&gt;&lt;i&gt;BatchUpdate_Enterprise.aspx&lt;/i&gt;&lt;/b&gt;. In child table (orders), we hanlde insert and select the identity with &lt;b&gt;&lt;i&gt;DoInsert&lt;/i&gt;&lt;/b&gt; method.&lt;br /&gt;You can try to see the method in &lt;b&gt;&lt;i&gt;dsNorthwind_Extended.cs&lt;/i&gt;&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>AutoIncrement of KeyField giving problem in child tables</title><link>http://www.intersoftsolutions.com/Community/WebGrid/AutoIncrement-of-KeyField-giving-problem-in-child-tables/</link><pubDate>Mon, 07 Jun 2010 05:41:41 GMT</pubDate><dc:creator>huzzy143</dc:creator><category>WebGrid</category><category>WebGrid BatchUpdate</category><category>WebGrid Enterprise</category><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Why there is no reply from your side???&lt;br /&gt;&lt;/p&gt;</description></item><item><title>AutoIncrement of KeyField giving problem in child tables</title><link>http://www.intersoftsolutions.com/Community/WebGrid/AutoIncrement-of-KeyField-giving-problem-in-child-tables/</link><pubDate>Sat, 05 Jun 2010 01:30:58 GMT</pubDate><dc:creator>huzzy143</dc:creator><category>WebGrid</category><category>WebGrid BatchUpdate</category><category>WebGrid Enterprise</category><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I have gone through those articles. But they do not seem to help much in my case.&lt;/p&gt;
&lt;p&gt;I must be doing something wrong while definign the columns or child tables.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Please have a look at my attached file and tell me what my be possible mistake i am doing.&lt;/p&gt;
&lt;p&gt;One question.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Do you support Auto-increments in child tables?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Huzefa&lt;/p&gt;</description></item><item><title>AutoIncrement of KeyField giving problem in child tables</title><link>http://www.intersoftsolutions.com/Community/WebGrid/AutoIncrement-of-KeyField-giving-problem-in-child-tables/</link><pubDate>Fri, 04 Jun 2010 16:16:48 GMT</pubDate><dc:creator>yudi</dc:creator><category>WebGrid</category><category>WebGrid BatchUpdate</category><category>WebGrid Enterprise</category><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Please check&amp;nbsp;'New Identity Insert'&amp;nbsp;documentation of WebGrid that related to auto-increment field and SmartBatchUpdate&amp;trade; at &lt;a href="http://support.intersoftpt.com/Docs/WebGrid/7.0.7200/New Identity Insert.html" target="_blank"&gt;here&lt;/a&gt;.&lt;br /&gt;I’m sure it helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>AutoIncrement of KeyField giving problem in child tables</title><link>http://www.intersoftsolutions.com/Community/WebGrid/AutoIncrement-of-KeyField-giving-problem-in-child-tables/</link><pubDate>Fri, 04 Jun 2010 08:22:56 GMT</pubDate><dc:creator>huzzy143</dc:creator><category>WebGrid</category><category>WebGrid BatchUpdate</category><category>WebGrid Enterprise</category><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I want to perform Batch Update in Hierarchical WebGrid when attaching WebGrid to CustomObjects.&lt;/p&gt;
&lt;p&gt;Everything works fine accept that i want the DataKeyField of ChildTables and RootTable to AutoIncrement itself when user adds a  new record into it.&lt;/p&gt;
&lt;p&gt;The WebGrid doesn't seem to recognise the AutoIncrement property assigned to DataKeyField column and adds an empty string as id when adding a new rows. And i am not allowed to enter more then 1 record into the WebGrid due to empty string being given as DataKey on first row add.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;This problem doesn't seem to occur in RootTable. Only ChildTables has this error.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Can you please tell what i am doing wrong here???&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Note: I have attached the aspx file that i am using in which i am facing a problem and also i have attached a image file to display the error that i recieve while adding a new row.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Huzefa&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>