Tariq,
Instead of calling DELETE right away, you can call a method.
So, if the grid you are using is your own subclass, you can put a method in it like say, DeleteRecord(). You may also create this method in your form class if you prefer.
So, the following lines will be on your WHEN event of grid would look like:
ON KEY LABEL CTRL+D This.DeleteRecord()
And DeleteRecord() would look like:
IF MESSAGEBOX( "Are you sure to delete current record?", 4+32, "Confirm Deletion" ) = 6
DELETE
ENDIF
Hope to help.
Dennis
>Dear Experts
>
>I have following codes in VALID event of grid
>
>ON KEY LABEL CTRL+D
>
>
>then following lines is on WHEN event of grid
>
>ON KEY LABEL CTRL+D DELETE
>
>
>When user press CTRL+D then current record is deleted.
>
>I want to displays this message box before deletion
>
>Are you sure to delete current record?
>
>What will be the best procedure to delete from grid with confrirmation messagebox.