I have a Silverlight Page where i have the a button control and a Datagrid. The Click event on the Silverlight Page navigates to a Silverlight Child Window. The DataGrid on the Silverlight Page displays the Orders of all Customers. The Silverlight Child Window has a dataform and textfields and a combo box of customers. There is no issue with saving the data on the ChildWindow. The issue starts when i click OK on the ChildWindow. The datagrid on the Silverlight page is populated with the Orders info. One of the columns in the DataGrid is the CustomerID column. To make the user better understand whose order it is i decided to add a c开发者_JAVA技巧ombo box to the datagridtemplatecolumn. The combobox binds perfectly to the CustomerDataSource. But for each order i want it to display the corresponding Customer Name. But this does not happen. How can i achieve this?
Here is my code to set the Combobox selectedvalue
<ComboBox Name="cmbCodeParts"
Width="120"
HorizontalAlignment="Left"
ItemsSource="{Binding ElementName=tblRecipe_CodePartsTypeDomainDataSource, Path=Data,Converter={StaticResource debugconverter}}"
DisplayMemberPath="codePartsType"
SelectedValuePath="codePartsTypeID"
SelectedValue="{Binding codePartsTypeID,Mode=TwoWay,Converter={StaticResource debugconverter}}"/>
精彩评论