• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 360
  • Last Modified:

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.
0
seinc
Asked:
seinc
1 Solution
 
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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now