Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid movement
Message
De
19/08/1999 12:24:01
 
 
À
19/08/1999 08:22:48
James Boden
Software Solutions For Business
Cumberland, Maryland, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00254642
Message ID:
00255364
Vues:
28
Hi Jim.

>> When the user presses the add button it will append a blank into the database. I want them to stay just in that row and not be able to move up or down in the grid if there is other records. I want them to move to the left or right in the grid on that row and no other row. I hope that this is clear. <<

In that case, the way that I would handle it is to make sure that the grid's RecordSource is table buffered. Then I would add a custom property to the grid and save the recordSource's current record number to the property in the grid's BeforeRowColChange method. Then, in the AfterRowColChange, check to see if grid.nOldRecNo = RECNO(grid.RecordSource). If not, Save RECNO(grid.recordSource) to a local variable called lnRecNo. GO grid.nOldRecNo IN Grid.RecordSource) and check to see if all the record level validation passes. If not, issue a NODEFAULT, otherwise, go back to the record you were originally trying to navigate to (lnRecNo).

Does this make sense? If not, I will try to dig up some code that I use to accomplish this and get back to you with it. I just don't have it handy right.

Marcia
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform