Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 5 Valid Clause in a Grid not Functioning Properly
Message
 
À
10/12/2001 03:34:10
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00589813
Message ID:
00592055
Vues:
19
Cetin,

If I may ask two more short questions?
Why don't use the valid clause
What would the code for a typical interactivechange contain in terms of what happens when the data is invalid?

>Allan,
>Just tried with a formset in 2 forms with having one grid each. It's working. I only used thisformset.lHangingValidation instead.
>PS: To enforce I also used an expression in interactivechange (actually I never use valid for validation) :
>thisformset.lHangingValidation = !(this.Value is valid)
>Cetin
>
>>Cetin,
>>
>>I tried your coding and it worked correctly on one grid in a form within the formset. On another grid in another form in the same formset it did not work.
>>I checked the code over and over again.
>>Are there some scenarios under which the grid/valid technique does not work properly?
>>Many thanks.
>>
>>>>I am having a problem with a valid clause of a text box in a grid returning .f. but allowing the control to lose focus. Here is the scenario:
>>>>
>>>>The form (contained in a formset) has a grid with three text boxes. On the same form there are some command buttons. If I enter invalid data in the text box a message box with an error message is displayed, I return 0 and the focus remains correctly in the text box. If I then click on one of the command buttons, the command button gets the focus, my message box about the invalid data is displayed and then the command button incorrectly gets the focus.
>>>>
>>>>I have spent many hours on this problem and I would appreciate any assistance.
>>>>TIA.
>>>
>>>Alan,
>>>It's a known bug up till VFP7. There are multiple workarounds :
>>>
>>>Add a property to form called lHangingValidation. Suppose your valid routine does a checking and returns llValid
>>>
>>>*...
>>>return llValid
>>>
>>>Change it to :
>>>*...
>>>thisform.lhangingvalidation = !llValid
>>>return llValid
>>>
>>>*Grid.Valid
>>>return !thisform.lHangingValidation
>>>
>>>Is one way.
>>>
>>>For a better handling check FoxyClasses that does it at grid class level.
>>>Cetin
Regards,

Allan Coganovitch
allanc@proven-solutions.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform