Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>>I have a pageframe with two pages. Each page has a grid with a combo box inside. I also create a button "Cancel" in which I have the following code for the click method.
>>
>>SELECT Child1
>>=tablerevert(.t.)
>>
>>SELECT Child2
>>=tablerevert(.t.)
>>
>>SELECT Parent
>>=tablerevert(.t.)
>>
>>thisform.refresh()
>>
>>However, everytime when I change something and press the "Cancel" button, only Child1 and the Parent restored to their origin values. Whatever changes to Child2 get stored and cannot be reverted. Does anyone know how I can "revert" all the tables?
>>
>>Thanks
>>
>>
>>Chu
>
>I guess, tablerevert works Ok. The problem that you should refrezh both pages (Thisform.Refresh does it for active page only). The best solution here is to fire This.Refresh from each Page.Activate event.
I tried that also. But still, it doesn't work. The strange thing is if I add a new record in the grid, tablerevert works fine for both tables. However, if I just edit the old record in the grid, I am not be able to revert it.
Chu
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement