views:

324

answers:

0

Hi,

in my first Silverlight 2 app I've a datagrid which is bound to a ObservableCollection, in one of the colums I've put a Combobox which hold a ObserversableCollection

A "Order" consists of number of properties, one of those properties is a "Customer" object.

If I show the orders in the grid, I would be happy if the correct customer is shown in the Combobox. With the XAML code behind I keep getting a combobox with NOTHING selected.

Databinding is done using a MVVM and that one is filled using a async (duh) WCF. I've read something about if you set SelectedItem before you set Datasource ... Which might be the case as the ObservableCollections are fetched async from the WCF.

Any help would be much appreciated !

<ComboBox x:Name="combotest" 
                                  ItemsSource="{Binding listCustomers, Source={StaticResource listpers}}" 
                                  SelectedItem="{Binding Customer, Mode=TwoWay}" 
                                >

qsdf