Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid ignores index when adding records
Message
De
22/03/1999 22:06:24
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Grid ignores index when adding records
Divers
Thread ID:
00200776
Message ID:
00200776
Vues:
37
In VFP 6, I have a grid with a free table as the recordsouce and table buffering is enabled. The table contains steps to be performed in manufacturing parts. One field is call "step" and is automatically assigned by my program when the user clicks the cmdAdd button. My code calculates the next step number (in increments of 10) and does:

append blank
replace part_no with thisform.part_no
replace step with nNext_Step
thisform.grid1.column2.setfocus()

The index is: part_no+str(step,2,0)

Sometimes, the user might shift-tab to go from column2 to column1, and then change the step number to move it between two existing steps. So let's say the code gave them step number 40, then they changed it to 25 to make this step appear between step 20 and step 30.

However, the grid does not reflect this change until after the new record is tableupdated().

When changing the step number of a record that already existed (i.e. edditing a record, instead of adding a new record), the grid updates (moves the record) immediately, without waiting for a save. This is the desired performance.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform