Hi to all,
I have a lookup combobox the ItemsSource is populated through a [DataContract] in a WCF Service. The ComboBox has a DisplayMemberPath property (which I use to define which field to show) but does NOT have a ValueMemberPath property (as other Comboboxes do). How, then, can I define the field that shall assign the value of the control? Some people seem to use the ItemsSource property and give it a {Binding}, that seems to work, but as I have to assign these bindings in my code (Completed-Event when the data arrived from the WCF service) how could I do this? Who has done a similar thing before me?
This is my event to populate the ComboBox
private void proxy_GetAllKeyArtikelBestellbarCompleted(object sender, GetAllKeyArtikelBestellbarCompletedEventArgs e)
{
if (e.Result != null)
{
this.cboKeyArtikelBestellbar.ItemsSource = e.Result;
In XAML the Combobox looks like this
<ComboBox Grid.Column="1" Grid.Row="1"
x:Name="cboKeyArtikelBestellbar"
Width="130"
HorizontalAlignment="Left"
DisplayMemberPath="Bestellbar"
SelectedItem="{Binding Path=IdKeyArtikelBestellbar}"
>
But this last attribute (SelectedItem) is not working. Anyway the Item would be a whole set of fields, not just a Binding Path...
How to?