Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleted() in Grid
Message
De
02/02/2001 11:00:51
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00471551
Message ID:
00471780
Vues:
24
Hi Mark,
When I issued a
NODEFAULT
RETURN 0
from the Deleted() method, I found no effect. (The delete via click still occurs). I wonder what the difference is?



>The following code is what I have in my base grid class. I also have a grid property call lWarning. If this property is TRUE, I prompt the user with a message box to confirm the deletion.
>LPARAMETERS nRecNo
>local lcRecordSource, lnSelect
>lcRecordSource = This.RecordSource
>if empty(lcRecordSource)
>   return
>endif
>lnSelect = select()
>select (lcRecordSource)
>if This.RecordSourceType < 2
>   local lnRetVal
>   goto record nRecNo
>   This.Refresh()
>   if This.lWarning
>      lnRetVal = MsgSrvr("Please confirm. Delete record?")
>      if lnRetVal <> IDYES
>         NoDefault
>         return 0
>      endif
>   endif
>   delete next 1
>   skip -1
>   if bof()
>      locate
>   endif
>   This.Refresh()
>endif
>NoDefault
>select (lnSelect)
>Return
Charlie
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform