Click here to Skip to main content
15,882,152 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using WPF(.net 4) datagrid binded to Entity object and user can Remove a Row By Del Key.

i save the data into data base after user delete a row(savechange() methode).my problem is when the savechange() method return error.

I need to recover Deleted Row into Data Grid after error showed.Removed Item is not in datagrid.Items but is in dataGrid.ItemSource!!!!!!!.

i used the Items.Insert(index,Item) method but returned Error("Operation is not valid while ItemsSource is in use. Access and modify elements with ItemsControl.ItemsSource instead." How can I do that?

Is there any straight way?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900