Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Article how to validate records in grid
Message
De
14/06/2002 08:48:07
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00668180
Message ID:
00668467
Vues:
23
Hello Nadya.

See Re: Validation for Grid Thread #630571 Message #630572

Actually, with VFP 7.0, it is much easier to do this sort of thing. This is all you need in BRCC:
LPARAMETERS nColIndex
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 .ValidateCurrentRow()
        *** peachy keen go ahead and move off the row
        *** and make sure the highlight gets reset
        IF !.lAbout2LeaveGrid
          .nRecNo = 0
        ENDIF
      ELSE
        NODEFAULT
      ENDIF	
    ENDIF
  ENDIF
ENDWITH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform