Deleted
This event fires when you click in the delete mark column in a grid. Usage | PROCEDURE grdGrid.Deleted LPARAMETERS nRecNo |
In VFP 6 and earlier, Help says Deleted fires when the DELETE command is used to delete a record, too. It's wrong. None of Xbase DELETE, DELETE-SQL or RECALL fire Deleted. Only clicks in the delete mark column do it. The Help bug is fixed in VFP 7, though the new text is a little ambiguous. |
Example | PROCEDURE Deleted * Confirm the deletion. LPARAMETERS nRecNo LOCAL nResult * In this example, the message uses the record number. * In an application, you'd use data from the record. nResult = MESSAGEBOX("Do you really want to delete record?" ; + LTRIM(STR(nRecNo)), MB_YESNO + MB_ICONQUESTION) IF nResult = IDNO NODEFAULT ENDIF ENDPROC |
See Also | Delete, Delete-SQL, DeleteMark, Grid, NoDefault, Recall |
View Updates
Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.