Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BeforeRowColChange
Message
 
 
À
19/03/1998 00:37:27
Km Kwun
Eastop Consultants Limited
Nt, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00085562
Message ID:
00085928
Vues:
38
>In a VFP grid, how can we carry out a row level validation as the browse...valid... in FP2.6? When BeforeRowColChange fires, there is no way to know whether the user is changing row or column. Checking the lastkey is not feasible because the column/row change may be caused by a mouse click.

I have a grid subclass that I have added a property called CurrentRow. In the Init method of the grid, I set this property to the RecNo() of the table or cursor. Do not use Grid.ActiveRow because you take a significant performance hit on larger tables/cursors.

In the AfterRowColChange, I check to see if the current RecNo() is different than the CurrentRow property. If different, then the row changed, I execute whatever code, then reset the CurrentRow property to the new RecNo().
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform