During row validation I am checking to see if the row is a duplicate of another row in the GridView. If it is a duplicate, I set IsValid to false.
In RowEditEnded, I only save the underlying entity back to the database if row.IsValid == true.
However, the duplicate row still hangs out in the GridView. Additionally, if they close the Window and re-open it, the duplicate row is still there (it's a detached entity) even though it hasn't been persisted to the database. The duplicate row only disappears when the close the appellation and re-launch it.
I could remove all detached entities when the window is closing, but I'm hoping I can just remove the duplicate row in the RowValidating or RowValidated event handlers.
Any suggestions?
Thanks.
Aaron
In RowEditEnded, I only save the underlying entity back to the database if row.IsValid == true.
However, the duplicate row still hangs out in the GridView. Additionally, if they close the Window and re-open it, the duplicate row is still there (it's a detached entity) even though it hasn't been persisted to the database. The duplicate row only disappears when the close the appellation and re-launch it.
I could remove all detached entities when the window is closing, but I'm hoping I can just remove the duplicate row in the RowValidating or RowValidated event handlers.
Any suggestions?
Thanks.
Aaron