<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Binding Combo Boxes</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Binding Combo Boxes</description>
  <pubDate>Sun, 12 Apr 2026 04:32:17 -700</pubDate>
  <lastBuildDate>Wed, 10 Oct 2007 13:40:32 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=463</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Binding Combo Boxes : Thanx Bill that did it. I wonder...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=463&amp;PID=1553#1553</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 463<br /><strong>Posted:</strong> 10-Oct-2007 at 1:40pm<br /><br />Thanx Bill that did it. I wonder what I am doing wrong with my other list boxes.]]>
   </description>
   <pubDate>Wed, 10 Oct 2007 13:40:32 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=463&amp;PID=1553#1553</guid>
  </item> 
  <item>
   <title>Binding Combo Boxes : Finally got a chance to run this...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=463&amp;PID=1539#1539</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=97" rel="nofollow">Bill Jensen</a><br /><strong>Subject:</strong> 463<br /><strong>Posted:</strong> 10-Oct-2007 at 11:49am<br /><br />Finally got a chance to run this by Ward.&nbsp; This is in fact the best (and most Cabanaesque) solution.&nbsp; So I stand by it.<DIV>&nbsp;</DIV><DIV>And I agree with Bill C.--the ListConverterService is the way to go.</DIV><DIV>&nbsp;</DIV><DIV>Bill J.</DIV>]]>
   </description>
   <pubDate>Wed, 10 Oct 2007 11:49:42 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=463&amp;PID=1539#1539</guid>
  </item> 
  <item>
   <title>Binding Combo Boxes : I&amp;#039;d highly suggest utilizing...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=463&amp;PID=1414#1414</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 463<br /><strong>Posted:</strong> 02-Oct-2007 at 4:03pm<br /><br />I'd highly suggest utilizing the ListConverterService.&nbsp; You could create your string list in the GetMyListBindingSource method (returns a <a href="http://www.ideablade.com/techtip_thebindablelist.htm" target="_blank">BindableList</A>).&nbsp; The strings could technically come from anywhere...database, xml file, text file, etc.&nbsp; Or, just hard code them.&nbsp; Then, if you need that list elsewhere...it's all ready to go.]]>
   </description>
   <pubDate>Tue, 02 Oct 2007 16:03:26 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=463&amp;PID=1414#1414</guid>
  </item> 
  <item>
   <title>Binding Combo Boxes : I&amp;#039;ve tried this myself: I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=463&amp;PID=1412#1412</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=97" rel="nofollow">Bill Jensen</a><br /><strong>Subject:</strong> 463<br /><strong>Posted:</strong> 02-Oct-2007 at 3:58pm<br /><br /><P>I've tried this myself:</P><DIV>I added a string-valued property named "Direction" (and a PropertyDescriptor) to my Employee class.</DIV><DIV>&nbsp;</DIV><DIV>Using the ControlBindingManager I bound the Direction property to a (DotNet) ComboBox, leaving&nbsp;the ListConverter configuration at default values.</DIV><DIV>&nbsp;</DIV><DIV>I added a constant named "Direction" to ListConverterNames (in the Interface project)</DIV><DIV>&nbsp;</DIV><DIV>In the ListConverterService (in the Foundation module) I added a new case for "Direction" that calls MakeDirectionConverter() to CreateServiceItemCore().</DIV><DIV>&nbsp;</DIV><DIV>I added the method:</DIV><DIV>&nbsp;</DIV><FONT size=2><P></FONT><FONT color=#808080 size=2>///</FONT><FONT color=#008000 size=2> </FONT><FONT color=#808080 size=2>&lt;summary&gt;</FONT><FONT color=#008000 size=2>Get the global ListConverter for all TitlesOfCourtesy.</FONT><FONT color=#808080 size=2>&lt;/summary&gt;</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>ListConverter</FONT><FONT size=2> MakeDirectionConverter()</P><P>{</P><P></FONT><FONT color=#008080 size=2>ListConverter</FONT><FONT size=2> converter = </P><P></FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>ListConverter</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>typeof</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2>), </FONT><FONT color=#008080 size=2>Editability</FONT><FONT size=2>.Optional);</P><P>converter.ListSource = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>BindingSource</FONT><FONT size=2>(mDirections, </FONT><FONT color=#0000ff size=2>null</FONT><FONT size=2>);</P><P>converter.DisplayMember = </FONT><FONT color=#800000 size=2>"__Self"</FONT><FONT size=2>;</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> converter;</P><P>}</P><P></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2>&#091;&#093; mDirections = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2>&#091;&#093; { </FONT><FONT color=#800000 size=2>"North"</FONT><FONT size=2>, </FONT><FONT color=#800000 size=2>"South"</FONT><FONT size=2>, </FONT><FONT color=#800000 size=2>"East"</FONT><FONT size=2>, </FONT><FONT color=#800000 size=2>"West"</FONT><FONT size=2> };</P><DIV></DIV><P>to the ListConverterService.</P><DIV></DIV><DIV></DIV>Finally (!) I added this code to the presenter for my view:<DIV></DIV><DIV></DIV><DIV></DIV><FONT size=2><P></FONT><FONT color=#808080 size=2>///</FONT><FONT color=#008000 size=2> </FONT><FONT color=#808080 size=2>&lt;summary&gt;</FONT><FONT color=#008000 size=2>Bind to the Direction List Control</FONT><FONT color=#808080 size=2>&lt;/summary&gt;</P></FONT><FONT size=2><P></FONT><FONT color=#808080 size=2>///</FONT><FONT color=#008000 size=2> </FONT><FONT color=#808080 size=2>&lt;remarks&gt;</P></FONT><FONT size=2><P></FONT><FONT color=#808080 size=2>///</FONT><FONT color=#008000 size=2> Adds the proper ListConverter for Direction.</P></FONT><FONT size=2><P></FONT><FONT color=#808080 size=2>///</FONT><FONT color=#008000 size=2> </FONT><FONT color=#808080 size=2>&lt;/remarks&gt;</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> BindDirection() {</P><P>SetBindingListConverter(</FONT><FONT color=#008080 size=2>Employee</FONT><FONT size=2>.Descriptors.Direction, </FONT><FONT color=#008080 size=2>ListConverterNames</FONT><FONT size=2>.Direction);</P><P>}</P><DIV>This works--the list appears properly and the selected value is bound to the Direction property of the Employee entity.</DIV><DIV>&nbsp;</DIV><DIV>Whew!&nbsp; Thats quite a bit of stuff, though most of the complexity has to do with getting the ListConverter from a service, CAB style.&nbsp; I'll ask Ward if he can recommend a simpler mechanism.</DIV><DIV>&nbsp;</DIV><DIV>Bill</DIV></FONT></FONT>]]>
   </description>
   <pubDate>Tue, 02 Oct 2007 15:58:27 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=463&amp;PID=1412#1412</guid>
  </item> 
  <item>
   <title>Binding Combo Boxes : In earlier correspondence, Dan...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=463&amp;PID=1411#1411</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=97" rel="nofollow">Bill Jensen</a><br /><strong>Subject:</strong> 463<br /><strong>Posted:</strong> 02-Oct-2007 at 3:45pm<br /><br /><FONT color=#0000cc>In earlier correspondence, Dan asked:</FONT><DIV>&nbsp;</DIV><DIV>How do I bind a ComboBox list to a constant list of values?</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000cc>Bill J. Replied:</FONT></DIV><DIV>&nbsp;</DIV><DIV>If you're using a DevEx ComboBoxEdit control,&nbsp;just leave the ListConverter data source blank.&nbsp; In the designer view in the control's properties, select the "Edit Items" link at the bottom and type in the constant strings you want to appear in the list. <DIV>&nbsp;</DIV><DIV>In the Dot Net Combo Box, there is an Items property with a collection editor to do the same thing.</DIV><DIV>&nbsp;</DIV><DIV>I think this will work as long as the combo is bound to a string-valued property.</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000cc>Dan replied:</FONT></DIV><DIV>&nbsp;</DIV><DIV>I tried that but it came back blank. <DIV>&nbsp;</DIV><DIV>What I did was add a string array in my presenter and then bound the combobox to that. Works like a charm.</DIV><DIV>&nbsp;</DIV><DIV>The only problem I have is that I get the red exclamation next to it and it doesn't bind properly.</DIV><DIV>&nbsp;</DIV><DIV>Value that is suppose to bind is the same as the values in the combobox.<BR></DIV></DIV></DIV>]]>
   </description>
   <pubDate>Tue, 02 Oct 2007 15:45:05 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=463&amp;PID=1411#1411</guid>
  </item> 
 </channel>
</rss>