Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleted() in Grid
Message
 
 
À
01/02/2001 19:37:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00471551
Message ID:
00471732
Vues:
14
>Hi...
>
>I have a grid in a form with DeleteMark = .T. and Deleted(). How may I hide the record after it's deleted by the user (that is, before the user clicks Save which updates the table)...?

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
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform