<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.lhotka.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>CSLA .NET discussion</title><link>http://forums.lhotka.net/forums/5.aspx</link><description>General discussion about CSLA .NET</description><dc:language /><generator>CommunityServer 2008.5 SP3 (Build: 36.8414)</generator><item><title>Re: Csla-&gt;telerik radGrid binding on AddNew - ideas?</title><link>http://forums.lhotka.net/forums/thread/20887.aspx</link><pubDate>Wed, 30 Jan 2008 19:17:12 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:20887</guid><dc:creator>mongo</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/20887.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=20887</wfw:commentRss><description>&lt;P&gt;I need to correct - &lt;/P&gt;
&lt;P&gt;You do not need to modify UpdateObject event on your datasource to handle Inserts and Updates.&amp;nbsp; The InsertObject event will be properly raised.&lt;/P&gt;
&lt;P&gt;Also,&amp;nbsp; the telerik Grid methods are &lt;EM&gt;ItemCreated&lt;/EM&gt; and ItemCommand -&amp;nbsp;as opposed to InsertCommand as I incorrectly stated earlier.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Csla-&gt;telerik radGrid binding on AddNew - ideas?</title><link>http://forums.lhotka.net/forums/thread/20884.aspx</link><pubDate>Wed, 30 Jan 2008 16:39:53 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:20884</guid><dc:creator>mongo</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/20884.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=20884</wfw:commentRss><description>&lt;P&gt;Thanks Rocky,&lt;/P&gt;
&lt;P&gt;The telerik article that deals with this is located here: &lt;A href="http://www.telerik.com/help/aspnet/grid/grdInsertingValuesInPlaceAndEditForms.html"&gt;http://www.telerik.com/help/aspnet/grid/grdInsertingValuesInPlaceAndEditForms.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If that link isn't available down the road, here is the general idea with Telerik:&lt;/P&gt;
&lt;P&gt;There are two events on the grid that you can hook - InsertCommand and ItemCommand.&amp;nbsp; The easiest command to hook is ItemCreated because it's far less noisy than ItemCommand.&amp;nbsp; In InsertCommand, you can test to see if the item in question is being inserted (as opposed to editing a pre-existing object) and assign a new business object to it.&amp;nbsp; If you have an inline or form based edit, you will get this command fired once for each element being rendered.&amp;nbsp; If you are using a custom control, you will see this event fired once for the control.&amp;nbsp; If you are using a custom control, you must float the "public object DataItem" property on your control to get the data object assigned for binding purposes.&lt;/P&gt;
&lt;P&gt;The code in the ItemCreated event looks something like this:&lt;/P&gt;
&lt;P&gt;if( e.Item.OwnerTableView.IsItemInserted )&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;e.Item.DataItem = MyBusinessObject.CreateNewObject(...);&lt;/P&gt;
&lt;P&gt;You'll then need to adjust your CslaDataSource_UpdateObject(...) command to behave appropriately (insert vs. update).&lt;/P&gt;
&lt;P&gt;Thanks again,&lt;/P&gt;
&lt;P&gt;-Steve&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Csla-&gt;telerik radGrid binding on AddNew - ideas?</title><link>http://forums.lhotka.net/forums/thread/20847.aspx</link><pubDate>Tue, 29 Jan 2008 19:40:13 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:20847</guid><dc:creator>mongo</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/20847.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=20847</wfw:commentRss><description>&lt;P&gt;This makes perfect sense - an AddNew-style event is not readily apparent on the telerik control so I am pursuing this with telerik.&amp;nbsp; Once I have an approach, I'll post it here in case others are looking for the same behavior.&lt;/P&gt;
&lt;P&gt;Thank you&lt;BR&gt;-Steve&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Csla-&gt;telerik radGrid binding on AddNew - ideas?</title><link>http://forums.lhotka.net/forums/thread/20842.aspx</link><pubDate>Tue, 29 Jan 2008 19:12:12 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:20842</guid><dc:creator>RockfordLhotka</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/20842.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=20842</wfw:commentRss><description>&lt;P&gt;Web data binding doesn't normally end up invoking AddNewCore(), because they don't use IBindingList.&lt;/P&gt;
&lt;P&gt;Do you know what postback event occurs when you click "Add new item"? That is most likely where you'll need to put a bit of code to ask your collection for a new item - and you could call IBindingList yourself if that seems easiest - or implement some other public method on your collection that creates/adds a new item.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Csla-&gt;telerik radGrid binding on AddNew - ideas?</title><link>http://forums.lhotka.net/forums/thread/20840.aspx</link><pubDate>Tue, 29 Jan 2008 18:29:08 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:20840</guid><dc:creator>mongo</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/20840.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=20840</wfw:commentRss><description>&lt;P&gt;I'm hoping someone can point me in the right direction.&lt;/P&gt;
&lt;P&gt;I have a telerik grid (under ASP.NET)&amp;nbsp;configured on my page setup along with a CslaDataSource configured to my BusinessListBase derived class.&amp;nbsp; This has one level of objects in a collection of BusinessBase objects- nothing fancy here.&lt;/P&gt;
&lt;P&gt;When I click the "Add new item" item, I would hope that a new BusinessObject would get created and bound to for the initial value display.&amp;nbsp;&amp;nbsp;&amp;nbsp;I am hoping that I have the opportunity to load default values in the DataPortal.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;I am not seeing anything that sticks out - I tried overriding the AddNewCore() method on the collection to see if the grid was making a call but nothing came through.&amp;nbsp; I'm guessing I'm probably missing something obvious here.&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;-Steve&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>