I have XamComboBox set in Xaml like:
<ig:XamComboEditor IsEditable="False"ItemsSource="{Binding Path=Items,Mode=TwoWay}" DisplayMemberPath="ItemName" SelectedItem="{Binding MyEntity.SelectedItem, Mode=TwoWay, ValidatesOnNotifyDataErrors=False}" />IN VM, the binding property definened as:public ObservableCollection<MyObject> Items;public MyEntity MyEntity;then in vm code, when data is loaded from DB, I want to set proper data for UI binding to display the data. So what I did is:MyEntity.SelectedItem = Items.OrderByDescending(x => x.CreatedDate).FirstOrDefault();but UI did not display the data properly. I can't fire property changed event as SelectedItem is member of MyEntity, not the VM. How to resolve this problem?
Hello Benjamin,
I am just checking if you require any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hi Benjamin,
The best approach would be to wrap MyEntity.SelectedItem into a property of your VM and bind XamComboEditor's SelectedItem to the wrapped property. This way you would be able to raise PropertyChanged for it and ComboEditor will get notified about the change.
Hope this helps,