Hi Canh,
Write this code that Naomi suggested in a custom textbox class and use YOUR textbox in the columns of the grid instead of the default VFP textbox baseclass. This will avoid the issue you brought up of having to code this multiple times.
>>Hi all.
>>I would like to make undo and redo action in a grid to edit a table. This procedure is similar redo and undo button of MS Word. Please give me some ideas to do that.
>>Thanks.
>>Canh
>
>The simplest idea which comes to mind is to have a textbox with two properties: uCurValue and uPrevValue. In the GotFocus you would do
>this.uPrevValue = this.value
>
>and in InteractiveChange you would update uCurValue. Then you can code Redo/Undo buttons.
>
>Hi.
>Thanks your ideas. However, that do redo or undo with only one level. In the other hand, when we work with a grid, we will lost much time to write code for textbox in many colunms.
>Canh.
Paul A. Busbey
Victoria Insurance