Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding new rows to a grid under program control
Message
 
 
À
03/09/1998 18:06:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00133037
Message ID:
00133310
Vues:
11
>I am trying to allow users to add a new item to an invoice grid. I would like the new line (row) to be formatted with the correct line number, todays date etc. I have been trying to insert the appropriate code into the beforerowcolchange or afterrowcolchange events by determining the number of active rows in the invoice - checking which row is active - and detecting a "down-arrow" key pressed while in the last row.
>
>I am not able to make this work. I can determine the activerow in the afterrowcolchange event using the activerow property - but I cannot detect the downarrow key.
>
>Any Ideas? thanks in advance as always.

Is it that you're having trouble getting the down arrow to add a new row, or having trouble getting the information in the new record?

If the first, then as Cetin said, use allow add new.

If the second, there's a couple ways of doing it. If you're not using the down arrow, and instead are using a button for add, you can do INSERT INTO and insert the date, etc in right away.

If you're using the down arrow, you could set the defaults in the database, so when you append a new record, it automatically puts, say getline() for the line number and DATE() for the date.

-Michelle
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform