General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only