Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to know if row changed or column in beforerowcolchna
Message
From
04/06/2003 15:34:11
 
 
To
04/06/2003 14:31:16
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00796299
Message ID:
00796332
Views:
11
Hi Mark.

How could I know if the row changed or column in beforerowcolchanged and afterrowcolchanged events. I want to write something in there which should only happen if row has been changed and (and not column in the same row).

In VFP 7.0 and later, you can look at the grid's RowColChange property like this:
IF INLIST( This.RowColChange, 1, 3 )
  *** The row has changed
If you are in a version of VFP earlier than 7, you need a little more code to do this. You need to store the RECNO() of the current record in the grid's RecordSOurce to a grid property in the grid's BeforeRowColChange() like this:
This.nCurRec = RECNO(.RecordSource)
And then compare the value in the grid's nCurRec property to RECNO( this.RecordSOurce ) in the grid's AfterRowColChange. If the two are different, the user has changed rows.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform