Click here to Skip to main content
15,909,445 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: WebRequest Perfomance ! Pin
Colin Angus Mackay12-Dec-08 3:08
Colin Angus Mackay12-Dec-08 3:08 
QuestionRedo undo functionality in Grid Pin
infowareindia@gmail.com11-Dec-08 18:44
infowareindia@gmail.com11-Dec-08 18:44 
AnswerRe: Redo undo functionality in Grid Pin
Mycroft Holmes11-Dec-08 19:30
professionalMycroft Holmes11-Dec-08 19:30 
AnswerRe: Redo undo functionality in Grid Pin
Dave Kreskowiak11-Dec-08 21:24
mveDave Kreskowiak11-Dec-08 21:24 
AnswerRe: Redo undo functionality in Grid Pin
Nanda_MR11-Dec-08 21:42
Nanda_MR11-Dec-08 21:42 
GeneralRe: Redo undo functionality in Grid Pin
Dave Kreskowiak12-Dec-08 4:34
mveDave Kreskowiak12-Dec-08 4:34 
GeneralRe: Redo undo functionality in Grid Pin
Jon_Boy12-Dec-08 4:42
Jon_Boy12-Dec-08 4:42 
AnswerRe: Redo undo functionality in Grid [modified] Pin
EliottA12-Dec-08 7:02
EliottA12-Dec-08 7:02 
I just finished off implementing a custom undo redo feature for a similar problem, what I did was create 4 classes. The first class is your UndoRedoManager class which will manage your undo/redo commands. Next we have our topmost class titled UndoRedoList which has 2 Collections. An Undo collection and a Redo collection. Then we have our middle class which has also a collection of what I needed was titled ChangesSet, since in my application we treated a series of cell changes as a single change. Last class is a change, where you record the cell location, the before value and the after value.

So on every cell change, you create a single ChangesSet object, and as many Change objects as you need (for each cell changed) and you store it in the ChangeSet collection, as a single entry in the UndoRedoList collection. for each undo command issued, move the ChangesSet object out of the Undo list into the Redo list.

Hard to explain, I can't provide the source but I will show you when I get home with some sample code based off of a datagridview. But, if you understand my broken logic above, you should be well on your way.

Just realized I forgot to say, if your datagridview cell being edited doesn't effect other cells, you obviously wouldn't need the second ChangesSet class, you would just need to create Change objects inside a Collection so you can cycle through it as you need to.

modified on Friday, December 12, 2008 1:22 PM

QuestionCalling parent form/container from user control Pin
Valkiri11-Dec-08 3:04
Valkiri11-Dec-08 3:04 
AnswerRe: Calling parent form/container from user control Pin
Ashfield11-Dec-08 3:18
Ashfield11-Dec-08 3:18 
GeneralRe: Calling parent form/container from user control Pin
Valkiri11-Dec-08 11:29
Valkiri11-Dec-08 11:29 
AnswerRe: Calling parent form/container from user control Pin
Tom Deketelaere11-Dec-08 4:15
professionalTom Deketelaere11-Dec-08 4:15 
GeneralRe: Calling parent form/container from user control Pin
Valkiri11-Dec-08 11:41
Valkiri11-Dec-08 11:41 
GeneralRe: Calling parent form/container from user control Pin
Tom Deketelaere11-Dec-08 21:12
professionalTom Deketelaere11-Dec-08 21:12 
GeneralRe: Calling parent form/container from user control Pin
Valkiri11-Dec-08 23:17
Valkiri11-Dec-08 23:17 
AnswerRe: Calling parent form/container from user control Pin
Dave Kreskowiak11-Dec-08 4:40
mveDave Kreskowiak11-Dec-08 4:40 
GeneralRe: Calling parent form/container from user control Pin
Valkiri11-Dec-08 12:11
Valkiri11-Dec-08 12:11 
GeneralRe: Calling parent form/container from user control Pin
Dave Kreskowiak11-Dec-08 12:44
mveDave Kreskowiak11-Dec-08 12:44 
GeneralRe: Calling parent form/container from user control Pin
Valkiri11-Dec-08 16:11
Valkiri11-Dec-08 16:11 
GeneralRe: Calling parent form/container from user control Pin
Dave Kreskowiak11-Dec-08 21:23
mveDave Kreskowiak11-Dec-08 21:23 
GeneralRe: Calling parent form/container from user control Pin
Valkiri11-Dec-08 22:21
Valkiri11-Dec-08 22:21 
QuestionUser defined type not defined - Error Pin
samsonx11-Dec-08 0:26
samsonx11-Dec-08 0:26 
AnswerRe: User defined type not defined - Error Pin
Ashfield11-Dec-08 1:20
Ashfield11-Dec-08 1:20 
AnswerRe: User defined type not defined - Error Pin
Nanda_MR11-Dec-08 21:49
Nanda_MR11-Dec-08 21:49 
QuestionSetting the DataTable object to Nothing Pin
Coding12345610-Dec-08 19:17
Coding12345610-Dec-08 19:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.