WPF Datagrid Row Edit Cancel

Nov 18, 2008 at 5:40 AM
I have a problem with new WPF datagrid....
i can edit the cells of the existing row but how can i get that whole row back when i cancel the edit...
Is this possible to get row back??
i can get the cell value back when i press Ecs but i dont know how to do it with whole row....
Nov 18, 2008 at 9:23 AM

Yes, this is possible. I am guessing you are binding to your own objects? if so, in order to provide this functionality you have to implement the IEditableObject interface:


See this blog post for a generic technique for implementing this interface:


You get this functionality for free if you bind to a DataTable because DataRowView implements this interface.

Colin E.