Quite often i need to add/delete/update the item in database via Jquery POST.
Now the next step is to either dynamically add row again via AJAX to show that this row was added or remove the row if it was deleted.
I want to know which method is best and used by companies.
The other solution i think is to update the whole List with jquery so that i don’t need to program separate function for edit/add/delete
So how should i go
Reloading whole list is very inefficient. It slows user too.
Server can respond informatically about the database action. So if the operation succeeds, server can respond for example:
and if operation fails, server can respond something like:
You can then update the affected list row, depending on the response, in the ajax callback function.