Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the value just entered into a grid cell
Message
From
02/04/2003 13:03:23
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00772987
Message ID:
00773093
Views:
11
Hi Michelle,

This happens why the sequence of the events within a grid is completely mistaken!

CASE A : Exit from grid:
grid.Valid
grid.BeforeRCC ( never is updated )
grid.Column.ActiveControl.Valid ( update ControlSource )

CASE B : Move cell to cell (simplified)
grid.BeforeRCC ( never is updated )
grid.Column.ActiveControl.Valid ( update ControlSource )
grid.Column.ActiveControl.Lostfocus
grid.Column.TargetCell.When ( go on cell however )
/* IF When return .T. */
grid.Column.TargetCell.Gotfocus
/* ELSE */
????????? they are in the null one
/* ENDIF */

This sequence creates a sea of problems if one is wanted to be created generic grid class that controls generic data input.

ActiveControl.Value=ActiveControl.Value forces the writing on controlSource, but it generates a ActiveControl.ProgrammaticChange,
not a ActiveControl.Valid!

For me (message for VFP Team):

CASE A : Exit from grid ( model for mouse click ):

grid.Column.ActiveControl.Valid ( update ControlSource and check field )
/* IF return .T. */ ( VFP Team Group1 standard ?!)
grid.BeforeRCC ( check record )
/* IF not set NODEFAULT var */ ( VFP Team Group2 standard ?!)
grid.Valid ( check table )
/* IF return .T. */
target.When
/* IF return .T. */
grid.Column.ActiveControl.LostFocus
/* IF not set NODEFAULT var */
grid.lostfocus ( absent ! )
/* IF not set NODEFAULT var */
target.gotfocus
/* ENDIF lostfocus */
/* ENDIF LostFocus */
/* ENDIF When */
/* ENDIF valid */
/* ENDIF BeforeRCC */
/* ENDIF valid*/

CASE B : Move cell to cell

grid.Column.ActiveControl.Valid /* update ControlSource and check field*/
grid.BeforeRCC /* check record */
grid.Column.TargetCell.When /* I can use updated value */
grid.Column.ActiveControl.Lostfocus
grid.Column.TargetCell.GotFocus
grid.AfterRCC

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform