473,385 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Undo deletions in DataGridView

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?
Jun 16 '06 #1
2 4341
"Michael A. Covington" <lo**@www.covingtoninnovations.com.for.address> wrote
in message news:%2***************@TK2MSFTNGP02.phx.gbl...
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
Jun 16 '06 #2
>> 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?


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?
Jun 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Lyn | last post by:
Hi, I have a text control on a form which is bound to table field StartDate which is in Date format. When updating the table record via the form, any data entered into the StartDate control is...
5
by: Lyn | last post by:
Hi, In the BeforeUpdate event of a textbox control I have the following simplified code:- Private Sub StartDate_BeforeUpdate(Cancel As Integer) MsgBox "StartDate Error -- Please Check and...
0
by: Wiktor Zychla | last post by:
I am still trying to get the Undo function work on Internet Explorer editor hosted as activex in my c# application. Some time ago I've found a note at msdn that says "undo is not supported". I...
3
by: babylon | last post by:
any facilities in csharp that can help me implmenting undo/redo in my application? thx
2
by: Ausclad | last post by:
Using a DatagridView in .net 2.0 How would you go about implementing an "undo" event? So if the user selects a row in the datagridview, then hits the delete key, I handle the deletion by using...
3
by: GoogleEyeJoe | last post by:
Dear ladies and gents, I'm trying to determine whether the .NET Framework implements a means of transactional processing without the need for a database. Essentially, I'd like to enlist...
4
by: =?Utf-8?B?UmljaA==?= | last post by:
Hello, Does vb2005 have a built-in UnDo feature / object for applications so that I can undo actions like other windows apps? Or do I have to write my own UnDo routine? If vb2005 does have a...
0
by: wizard of oz | last post by:
Hi all, I'm extending an Abstract Styled Document associated with a JTextPanel to implement a syntax highlighting editor. This is all working just fine - except for undo / redo. The problem...
1
by: Jeremy | last post by:
I'm working on an application that does some DOM manipulation. I want to add a mechanism for "Undo" so that the user can revert to the previous state after performing a mistaken action. Simple...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.