Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete from Grid
Message
De
18/02/2011 09:43:31
 
 
À
18/02/2011 09:22:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01500698
Message ID:
01500704
Vues:
70
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform