<?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: Winforms databinding prob with combobox and newly created object</title><link>http://forums.lhotka.net/forums/thread/41095.aspx</link><pubDate>Wed, 10 Mar 2010 18:26:57 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:41095</guid><dc:creator>tiago</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/41095.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=41095</wfw:commentRss><description>&lt;p&gt;This is a recurring question as PTracker doesn&amp;#39;t include an example of combobox binding. Does anyone have a small sample to post?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Winforms databinding prob with combobox and newly created object</title><link>http://forums.lhotka.net/forums/thread/41094.aspx</link><pubDate>Wed, 10 Mar 2010 18:21:07 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:41094</guid><dc:creator>vschaak</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/41094.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=41094</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;thank you for your input. I&amp;#39;ve got to admit that I feel somehow sheepish about the real reason: the combobox&amp;nbsp;is the last control in tab order and pressing &amp;#39;save&amp;#39; just after choosing a value demands some form-validation, otherwise you&amp;#39;ll see a selected value, but it isn&amp;#39;t really written to the datasource&lt;img src="http://forums.lhotka.net/emoticons/emotion-10.gif" alt="Embarrassed" /&gt;&lt;/p&gt;
&lt;p&gt;So my $/&amp;euro; into the kitty...&lt;/p&gt;
&lt;p&gt;Best wishes&lt;/p&gt;
&lt;p&gt;Volker&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Winforms databinding prob with combobox and newly created object</title><link>http://forums.lhotka.net/forums/thread/41058.aspx</link><pubDate>Tue, 09 Mar 2010 00:44:31 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:41058</guid><dc:creator>mbblum</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/41058.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=41058</wfw:commentRss><description>&lt;p&gt;One more detail, usually the BO property gets bound to the combo&amp;#39;s .Value, not the .Text. There are exceptions, but typically the Value is saved to the BO and db, not the human readable Name.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Winforms databinding prob with combobox and newly created object</title><link>http://forums.lhotka.net/forums/thread/41052.aspx</link><pubDate>Mon, 08 Mar 2010 22:03:54 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:41052</guid><dc:creator>JonnyBee</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/41052.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=41052</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you drag a combox from the datasources windows the WinForms designer will create a databinding on the Text property.&amp;nbsp; But that&amp;#39;s usually not what you want to do with a BO property and using a NameValueList of valid choises.&lt;/p&gt;
&lt;p&gt;I&amp;#39;d recommend to drag a ComboBox from from the Toolbox and then use the ComboBox Tasks to configure databinding.And - then make sure to set the combobox listsource before you set the datasource for your BO and make sure to unbind in the opposite order. &lt;/p&gt;
&lt;p&gt;Finally - download the &lt;a href="http://windowsclient.net/downloads/folders/applications/entry1302.aspx"&gt;DataBinding FAQ&lt;/a&gt;,&amp;nbsp; &lt;a href="http://windowsclient.net/downloads/folders/applications/entry1304.aspx"&gt;DataGridView FAQ&lt;/a&gt; and&lt;a href="http://windowsclient.net/downloads/folders/applications/entry1332.aspx"&gt; Designer FAQ&lt;/a&gt; from &lt;a href="http://www.windowsclient.net%20"&gt;http://www.windowsclient.net&lt;/a&gt;. These FAQ are essential if you are going to be successful with Windows Forms Databinding. I also recommend to use the &lt;a href="http://windowsclient.net/blogs/faqs/default.aspx"&gt;Windows Forms FAQ &lt;/a&gt;on the same site.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Re: Winforms databinding prob with combobox and newly created object</title><link>http://forums.lhotka.net/forums/thread/41044.aspx</link><pubDate>Mon, 08 Mar 2010 16:47:45 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:41044</guid><dc:creator>Andy</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/41044.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=41044</wfw:commentRss><description>&lt;p&gt;I think you have to do it the other way around; bind the ComboBox&amp;#39;s list items first, then bind your business object.&amp;nbsp; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Winforms databinding prob with combobox and newly created object</title><link>http://forums.lhotka.net/forums/thread/41034.aspx</link><pubDate>Mon, 08 Mar 2010 14:43:51 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:41034</guid><dc:creator>vschaak</dc:creator><slash:comments>0</slash:comments><comments>http://forums.lhotka.net/forums/thread/41034.aspx</comments><wfw:commentRss>http://forums.lhotka.net/forums/commentrss.aspx?SectionID=5&amp;PostID=41034</wfw:commentRss><description>&lt;p&gt;Hi @all,&lt;/p&gt;
&lt;p&gt;I know, winforms is an outdated technology, but I&amp;#39;ve got to struggle with it.&lt;/p&gt;
&lt;p&gt;My object is presented on a form with one of it&amp;#39;s props beeing shown through&amp;nbsp;a combobox. So far so good. When showing&amp;nbsp;already db-persisted&amp;nbsp;objects, all goes fine and it shows the correct values (quite not until I first bound the object and then the combobox&amp;#39;s list, of course).&lt;/p&gt;
&lt;p&gt;Trouble starts, when I create a new object. While there is a value choosen in the box, the objects property remains empty&lt;img src="http://forums.lhotka.net/emoticons/emotion-12.gif" alt="Angry" /&gt;&lt;/p&gt;
&lt;p&gt;What do I have to do to REALLY bind the property?&lt;/p&gt;
&lt;p&gt;Thanks for your time&lt;/p&gt;
&lt;p&gt;Volker&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>