Before I actually ask the question, I need to explain my current situation.
I have a strongly typed (generated with VS2010) DataSet. Along with that, I have the corresponding typed DataTable and DataRow.
My problem happens when I commit a row using the DataGrid's built-in commands. It calls the BeginEdit(), CancelEdit() (only when I cancel), or EndEdit() twice, when they should only be called once.
I think the problem has something to do with the fact that I implemented IEditableObject on my strongly typed DataRows (it's a partial class).
I need somebody to enlighten me : why does the DataRow object implements IEditableObject methods, but doesn't implement IEditableObject?
Here is the exact behevior I'm expecting to have :
BeginEdit();
CancelEdit(); (if applicable)
Validate(); (Using **IDataError** interface)
EndEdit(); (With my own business logic.)
I know that the WPF DataGrid is quite powerful, it should be able to handle my problem.
Thank you, Micael
P.S. For your information, the bound ItemsSource of my DataGrid is an ObservableCollection of strongly typed DataRow.