Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids and the deleted() event
Message
From
28/02/2001 09:40:43
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00480466
Message ID:
00480502
Views:
10
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform