<?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 : ComboBox Binding in a DataForm</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : ComboBox Binding in a DataForm</description>
  <pubDate>Wed, 10 Jun 2026 17:02:58 -700</pubDate>
  <lastBuildDate>Thu, 26 Aug 2010 05:50:54 -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=2074</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>ComboBox Binding in a DataForm : Ok, Here is what I have  The...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2074&amp;PID=8206#8206</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=897" rel="nofollow">wwlgray</a><br /><strong>Subject:</strong> 2074<br /><strong>Posted:</strong> 26-Aug-2010 at 5:50am<br /><br />Ok, Here is what I have<DIV>&nbsp;</DIV><DIV>The dataform is in a child window popup. At form load I set the CurrentItem to the item I want to work on. In the Xaml I have a static resource of an ObservableColletion&lt;object&gt; as my itemsource. I have set in Xaml the SelectedValue and SelectedItem to my CurrentItem.Status_FK and the SelectedValuePath to the StatusCode_PK of the object as shown below.</DIV><DIV>&nbsp;</DIV><DIV>&lt;ComboBox x:Name="cmbStatus" <BR>ItemsSource="{Binding StatusLookups, Source={StaticResource statusLookups},Mode=TwoWay}" <BR>SelectedItem="{Binding Path=CurrentItem.Status_FK}"<BR>SelectedValue="{Binding Path=Status_FK,Mode=TwoWay}" <BR>SelectedValuePath="StatusCode_PK"<BR>DisplayMemberPath="Description" /&gt;</DIV><DIV>&nbsp;</DIV><DIV>On formload I set the dataform to edit. The currentitem.status_fk is not shown in the combobox.</DIV><DIV><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><P>this</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.projForm.CurrentItem = CurrentProject; // where the CurrentProject is the mainform selected item.</FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas></P><P></P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>this</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.projForm.BeginEdit();</P><DIV></DIV><DIV></DIV></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Thu, 26 Aug 2010 05:50:54 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2074&amp;PID=8206#8206</guid>
  </item> 
  <item>
   <title>ComboBox Binding in a DataForm : Here is a sample of one that I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2074&amp;PID=8183#8183</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2074<br /><strong>Posted:</strong> 25-Aug-2010 at 9:37am<br /><br />Here is a sample of one that I have done. It works fine.<DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ComboBox Name="VendorsComboBox"<FONT color=#cc0000> ItemsSource="{Binding Vendors}"&nbsp; </FONT><FONT color=#990000>DisplayMemberPath="VendorName"</FONT> Style="{x:Static Office2007:Office2007BlueResources.ComboBoxStyle}" <FONT color=#990000>SelectedValuePath="VendorId"</FONT> Grid.Column="4" Grid.Row="0" <FONT color=#990000>SelectedValue="{Binding Path=CurrentItem.VendorId, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" </FONT>IsSynchronizedWithCurrentItem="True" Width="170" HorizontalAlignment="Left" Height="20" TabIndex="4" /&gt;</DIV><DIV>&nbsp;</DIV><DIV>In my view code behind in my loaded event I have the following statement.</DIV><DIV>&nbsp;</DIV><DIV>this.DataContext = aModel&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; aModel is an object of the InventoryViewModel</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>in my VendorViewModel I have a private property called currentItem which has a public getter/setter called CurrentItem. currentItem contains the current Inventory item being worked on.</DIV><DIV>&nbsp;</DIV><DIV>Bill</DIV><DIV><BR>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 25 Aug 2010 09:37:17 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2074&amp;PID=8183#8183</guid>
  </item> 
  <item>
   <title>ComboBox Binding in a DataForm : Yes I have watched the video....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2074&amp;PID=8180#8180</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=897" rel="nofollow">wwlgray</a><br /><strong>Subject:</strong> 2074<br /><strong>Posted:</strong> 25-Aug-2010 at 7:04am<br /><br />Yes I have watched the video. Is there a sample with that code? I have tried it and it is not working for me.]]>
   </description>
   <pubDate>Wed, 25 Aug 2010 07:04:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2074&amp;PID=8180#8180</guid>
  </item> 
  <item>
   <title>ComboBox Binding in a DataForm : Did you take a look at this link...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2074&amp;PID=8104#8104</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=477" rel="nofollow">ting</a><br /><strong>Subject:</strong> 2074<br /><strong>Posted:</strong> 19-Aug-2010 at 5:25pm<br /><br />Did you take a look at this link which shows how to work with ComboBoxes?:<DIV><a href="http://www.ideablade.com/Videos/SamplesGrabBag/index.html" target="_blank">http://www.ideablade.com/Videos/SamplesGrabBag/index.html</A></DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 19 Aug 2010 17:25:04 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2074&amp;PID=8104#8104</guid>
  </item> 
  <item>
   <title>ComboBox Binding in a DataForm : I have 2 tables that I am binding...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2074&amp;PID=8092#8092</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=897" rel="nofollow">wwlgray</a><br /><strong>Subject:</strong> 2074<br /><strong>Posted:</strong> 18-Aug-2010 at 1:26pm<br /><br /><P style="MARGIN: 0in 0in 0pt" =Ms&#111;normal><SPAN style="COLOR: #1f497d"><FONT size=3><FONT face=Calibri>I have 2 tables that I am binding to&nbsp;a combobox inside a DataForm. The first table is the Collection built from the Devforce entity&nbsp;and the second is a lookup table brought into a static resource. </P><DIV>With the code below the combobox selects and updates the data, however when the dataform is bound we cannot get the current value to display. I need the current value to show when the form loads.<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></DIV><P style="MARGIN: 0in 0in 0pt" =Ms&#111;normal><SPAN style="COLOR: #1f497d"><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt">&lt;</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: #a31515; FONT-SIZE: 9.5pt">ComboBox</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: red; FONT-SIZE: 9.5pt"> Name</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt">="cmbStatus"</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"> <o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: red">ItemsSource</SPAN><SPAN style="COLOR: blue">="{</SPAN><SPAN style="COLOR: #a31515">Binding</SPAN><SPAN style="COLOR: red"> StatusLookups</SPAN><SPAN style="COLOR: blue">,</SPAN><SPAN style="COLOR: red">Source</SPAN><SPAN style="COLOR: blue">={</SPAN><SPAN style="COLOR: #a31515">StaticResource</SPAN><SPAN style="COLOR: red"> statusLookups</SPAN><SPAN style="COLOR: blue">}}"</SPAN><o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: red">DisplayMemberPath</SPAN><SPAN style="COLOR: blue">="Description"</SPAN><o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: red">SelectedItem</SPAN><SPAN style="COLOR: blue">="{</SPAN><SPAN style="COLOR: #a31515">Binding</SPAN><SPAN style="COLOR: red"> Path</SPAN><SPAN style="COLOR: blue">=Status_FK,</SPAN><SPAN style="COLOR: red">Mode</SPAN><SPAN style="COLOR: blue">=TwoWay}"</SPAN><o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: red">SelectedValuePath</SPAN><SPAN style="COLOR: blue">="StatusCode_PK"/&gt;</P><DIV></DIV><DIV></DIV><P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><o:p></o:p></SPAN></SPAN>&nbsp;</P>]]>
   </description>
   <pubDate>Wed, 18 Aug 2010 13:26:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2074&amp;PID=8092#8092</guid>
  </item> 
 </channel>
</rss>