Undo deletions in DataGridView

  • Thread starter Thread starter Michael A. Covington
  • Start date Start date
M

Michael A. Covington

Any thoughts about how best to implement "undo most recent deletion" in a
DataGridView in which the user is allowed to delete rows (but not edit their
contents)?

Is it as simple as stashing a copy of the DataGridView before doing the
deletion, and swapping it back in if the user hits Undo? What is the best
way to store all the data in a DataGridView?
 
Michael A. Covington said:
Any thoughts about how best to implement "undo most recent deletion" in a
DataGridView in which the user is allowed to delete rows (but not edit
their contents)?

Is it as simple as stashing a copy of the DataGridView before doing the
deletion, and swapping it back in if the user hits Undo? What is the best
way to store all the data in a DataGridView?

That sounds like the simplest thing that could possibly work, to me. Why not
do that, and see if there are any problems?

///ark
 
Is it as simple as stashing a copy of the DataGridView before doing the
That sounds like the simplest thing that could possibly work, to me. Why
not do that, and see if there are any problems?

OK. I'm a little vague as to how to save a copy of something as complicated
as a DataGridView. It would have to be cloned rather than just assigned to
a variable, wouldn't it? Could I just save its Rows member?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top