Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
After/BeforeRowColChange
Message
From
07/02/1999 17:29:05
Kenneth Downs
Secure Data Software, Inc.
New York, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
After/BeforeRowColChange
Miscellaneous
Thread ID:
00184929
Message ID:
00184929
Views:
60
Well, I'm guessing I'm not the first person to run into this. Perhaps somebody could share their experience in dealing with the awful ambiguities in the Grid's BeforeRowColChange and AfterRowColChange.

Mostly I'm trying to use BeforeRowColChange to trigger record level validation, but of course I don't want it firing as the user goes from cell to cell within a row.

I've subclassed the grid and added a property to track last known column. It seemed to me that I could compare this to the value passed to BeforeRowColChange, determine if it was a row or column being changed, and then validate where appropriate.

Also, in AfterRowColChange, I record the current column.

Alas, my record level validation is firing all of the time. The test I am using seems to simple to fail:

LPARAM nColIndex &&--Passed by VFP to BeforeRowColChange
IF nColindex = this.parent.nCurrentColumn
* Since new column equals old column, must be
* a row change, do validation here
ENDIF

Are there any known workarounds or general gymnastics for getting this to work?

As always, TIA.
Next
Reply
Map
View

Click here to load this message in the networking platform