Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Business Rules & FieldLevel Validation
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00504390
Message ID:
00504455
Vues:
13
>>Now for the issue: How can I display the caption to the field vice hardcoding when the BizRules are called by the BizObj upon save? For example, a cTextBoxL control with the caption "Last Name". During field level I could (not doing this now) pass the Label.Caption property to the validation method where it would be incorporated into the error message. During form level using the same method there is no way for the validation method to know Label.Caption. Any Ideas? I'm trying to maintain consistency and maintainability -- so changing the Label.Caption does not require a change in the validation method and messages all display the same whether field level or form level without hard coding some like 'Last Name'.
>

Robert,

Are all the controls on the form built from the same cTextBoxL class? If so, you should be able to access the label.caption using the class hierarchy. If you know the textbox, you should be able to get the label from the control using this.parent.label.caption. Unless I am reading the question wrong, which is a good posibility.

Kind Regards,

Mat
Matthew Kennedy
Decision Support Technology Inc.

"I try to take one day at a time, but sometimes several days attack me all at once." ~ Ashleigh Brilliant

New Jersey Dot Net User Group
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform