Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validating Record on Grid with Row Table Buffering
Message
From
11/10/2005 06:57:04
 
 
To
10/10/2005 22:31:11
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01057836
Message ID:
01057898
Views:
22
Is it possible to avoid moving record one grid where buffer mode is row table buffering and if the record it is not valid for any reason.

Try this in BeforeRowColChange:
WITH This
  IF INLIST( .RowColChange, 1, 3 )
    *** If we are trying to move to a new row
    *** validate the current row
    IF NOT EOF( .RecordSource ) AND RECCOUNT( .RecordSource ) > RECNO( .RecordSource )  
      *** Do not allow the move if the validation fails
      IF NOT .ValidateCurrentRow()
        NODEFAULT
      ENDIF	
    ENDIF
  ENDIF
ENDWITH
Previous
Reply
Map
View

Click here to load this message in the networking platform