For deletion you can maintain a flag in the table to mark it as deleted and upon undo, you can reset the flag to reappear the record again. But for all this to happend you have to create another table which logs the recent required changes and accordingly you can revert the changes. You can workout for Update and Insert too. This could be the simplest approach to do this.
Haven't tried to do this ever so I agree there could be better approaches available and soon we may see some good suggestions/solutions.
In the meantime, you may check following article if it is relevant to your problem-
Multilevel Undo and Redo Implementation in C# - Part I (Using Single Object Representing Change Approach)[
^]
Hope, it helps :)