DataGrid row deletes even when DataTable row delete is cancelled.

I finally managed to figure out how to abort the deletion of a row in a datatable that is bound to a datagrid. Now the problem is that the last row of the grid goes away. If I click the column header to sort the column, the row reappears.
I have found other people with the same problems but no solution yet.
seincAsked:
Who is Participating?
 
manojkumarpsCommented:
Hello seinc ,
       I do know that this is a common problem. But there are some tacky solutions to it.

     First of all when you rollback or abort the deletion procedure. After doing that just refresh the datagrid. It should work for you.

the datatable row can be compare for row.rowstate = modified.

if modified refresh the datagrid so that there is no loss in the last row.

Regards,
Manoj
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.