Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
tablerevert in Grid
Message
De
08/12/1997 17:03:10
 
 
À
08/12/1997 16:57:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00063641
Message ID:
00064540
Vues:
62
>>>>>>>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
>>>>
>>>>What kind of buffering do you use?
>>>
>>>I used pessimistic buffer mode first. But I then also tried optimistic buffer mode and the results are the same.
>>>
>>Did you try 'optimistic row' or 'optimistic table'? Remember, that 'optimistic row' buffering will trigger table updating automatically anytime you move pointer, and this cannot be reverted anymore.
>>>Chu
>
>I change the buffer mode in the form. So, the only choice are optimistic and pessimistic, but not "optimistic table" or "optimistic row". But I thought "pessimistic" mode will not update the records when I move the pointer, won't it?
>
>
>Chu

You should use DE.Cursor.BufferModeOverride properties to set table buffering. If you didn't do this you had row pessimistic or optimistic setting.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform