Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BeforeRowColChange
Message
 
 
To
19/03/1998 00:37:27
Km Kwun
Eastop Consultants Limited
Nt, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00085562
Message ID:
00085928
Views:
33
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform