I have a DataGrid with Combobox
<DataGridComboBoxColumn Header="Header 2" ItemsSource="{Binding Pet}">
Project based on MVVM pattern. When I try to display data on TextColumn, it works
<DataGridTextColumn Header="Header 1" Binding="{Binding ID}" />
But, I don't know, how to bind the data for DataGridComboBoxColumn.
The code of Model:
public string ID
{
get { return _id; }
set { _id = value; NotifyPropertyChanged("ID"); }
}
public string[] Pet
{
get { return _pet; }
set { _pet = value; NotifyPropertyChanged("Pet"); }
}