Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Validation for Grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00630571
Message ID:
00635472
Vues:
28
Thank Marcia

I put the code in the Init of the grid after doing a DODEFAULT(), is that okay?

>Error #: 5
>Message: Record is out of range.
>Line #: 20
>Code: GOTO .nRec2Validate IN ( .RECORDSOURCE )
>Method: afterrowcolchange
>Object: frmtjv1.pgf.grdCr

>
>Oooh, I'm so embarrassed. It looks like sloppy programming on my part. What you need is a check to make sure that .nRec2Validate is a valid record number.
>
>What you need to do is add some code when the grid is instantiated to initialize the .nRec2Validate properly:
>
>
>IF EOF( This.RecordSource ) OR This.nRec2Validate > RECCOUNT( This.RecordSource )
>  This.nRec2Validate = 0
>ENDIF
>
>
>I assume that there is a check for nRec2Validate > 0 in the AfterRowColChange method. At least there was in the code for the book.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform