views:

27

answers:

2

I have table having 10 rows per page. I am using ajax to delete records from table. But when i delete a record i am left with nine rows, which is not desirable.

How to maintain 10 rows per page (wherever applicable) after deletion. And off course i don't want to refresh the page too.

+1  A: 

When you POST the request to delete the data, have the response include some new data to insert at the beginning or end of the table.

David Dorward
A: 

Even if your data is split up on separate pages it should be considered as a continous list, so simply step through it to the offset after the deleted line to find the next line (which would have been the first line on the next page) and return it with the AJAX response.

kb