Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grids and the deleted() event
Message
De
28/02/2001 09:40:43
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:
00480466
Message ID:
00480502
Vues:
9
Hi Vincent,
You are right, that's the way it works. One work around is to do the work yourself. This is the idea. My real code is a bit different.
LPARAMETERS recno
LOCAL x, RetVal
Retval = .T.
GO (m.RecNo) IN (This.RecordSource)
IF DELETED(This.GRID.RecordSource)
   RECALL IN (This.GRID.RecordSource)
ELSE
   * During this method, the record isn't deleted yet!
   DELETE IN (This.GRID.RecordSource)
   * If it isn't deleted, the validation isn't... valid.
   * It's hard to see what validation problems will be 
   * caused if the record isn't deleted first.
ENDIF
FOR x = 1 TO This.ColumnCount
   RetVal = This.Columns[x].Valid() AND m.RetVal
ENDFOR
IF m.RetVal 
   ThisForm.ChangeFormMode(.T.)  && Show we're editing.
   * Since we have done the work, we don't need the 
   * the default behavior.
   NODEFAULT 
   This.Grid.Refresh()
ENDIF
RETURN m.RetVal
>if seems that the deleted() event in a girdcontrol, happens before the record is actually marked for deletion.is there any way to start the event after the record is marked for deletion? or is there a workaround?
>
>
>Tia,
>
>vincent
Charlie
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform