Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you handle Grid Delete Column/Method?
Message
De
04/05/1998 17:07:29
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00096634
Message ID:
00096870
Vues:
24
>The most confounding part of the grid is the delete column. I really want/need to use this feature, but it drives me crazy. What I want to do is fire code to recalculate invoice totals when a user clicks the delete column next to an item. However, the item is not "truly" deleted until after the code in the Grid delete method fires. The Deleted() function, if used in the method code, always returns the opposite value of what the record will be after the method code is executed. The recalculation does not reflect the correct total because the wanna-be deleted item is not yet deleted.
>
>Anyone care to shed some light on how you handle this? TIA.

Just a wild geese ... guess :). The event of grid.deleted() fires upon deletion, right? And the method you write there is supposed to handle it, therefore you may use it to prohibit deletion or do whatever you want when the bloody little square is clicked on, therefore I conclude it fires _before_ the record actually gets deleted. A simple thing I'd try (if I didn't have tons of my own things to try already) should be to

dodefault()
do_my_code_here
nodefault

in the grid.deleted() code. Its default behavior is to delete (or restore) the record, so just let it do it first.
Did I guess right?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform