In my view, I've implemented a the WPF DataGrid from CodePlex:
<toolkit:DataGrid x:Name="CodePlexDataGrid"
Style="{StaticResource ToolkitDataGrid}"
ItemsSource="{Binding Customers}"/>
It is bound to an ObservableCollection in my ViewModel:
private ObservableCollection<Customer> _customers;
public ObservableCollection<Customer> Customers
{
get
{
return _customers;
}
set
{
_customers = value;
OnPropertyChanged("Customers");
}
}
When I change data in the grid, it changes, but I can find no event that I can handle to catch those changes, e.g. DataGridCellChanged so that I can save the data that was entered back into the database.
What is the process by which we can capture the changes to the cells and save them back to the database?