This project has moved. For the latest updates, please go here.

how to use CheckComboBox with mvvm?

Feb 25, 2014 at 5:39 PM
Edited Feb 25, 2014 at 6:01 PM
I am using the CheckComboBox ver 2.0.0 in my wpf mvvm project
but I seem unable to bind the selecteditems. when Bind selecteditems to a property in wpf exception errror
SelectedItems="{Binding SelectedItemAccountUnitGroup }

'SelectedItems' property is read-only and cannot be set from markup. Line

That is why im using SelectedItemsOverride

how to save All checked items CheckComboBox to database?

i am using EF code First And Mvvm

but only one checked item CheckComboBox save to database

this is my code
binding in wpf window:
<xceedtoolkit:CheckComboBox Grid.Row="2" Grid.Column="3"  Name="xccedcheck"
                            ItemsSource="{Binding AccountUnitGroupList }"
                         SelectedValue="{Binding AccountUnitData.AccUnitGroupID}"
                         SelectedMemberPath="{Binding SelectedItemAccountUnitGroup, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
i am using
  SelectedValue="{Binding AccountUnitData.AccUnitGroupID}" 
to save to database but this metod only one checked item save

public AccountUnit AccountUnitData { get; set; } //this field for new Instance of my model in view model

 public ObservableCollection<AccountUnitGroup> AccountUnitGroupList { get; set; }//this list load mylist to CheckComboBox 

   private AccountUnitGroup _selectedItemAccountUnitGroup;

        public AccountUnitGroup SelectedItemAccountUnitGroup // this field for binding to SelectedItem or SelectedItems
            get { return _selectedItemAccountUnitGroup; }
                if (_selectedItemAccountUnitGroup != value)
                    _selectedItemAccountUnitGroup = value;

please help me by sample with mvvm