Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VALIDATION OF EACH COLUMN IN GRID
Message
De
07/09/1998 13:45:08
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00133749
Message ID:
00133830
Vues:
16
>>>Hi,
>>>
>>>Please help me
>>>
>>>I need the validation of each column in grid.
>>>It looks impossible to me.
>>>If not possible please guide which is the best third party tool for this.
>>>
>>>bye
>>>mmk
>
>>Nishit,
>>There are valid and lostfocus events for contained controls in column. And there is beforerowcolchange for columns. Also there is a grid.valid for rec level validation. So it's possible. One bug though, textbox.valid doesn't fire (in fact fire but doesn't do its job) if you click outside the grid. There is a workaround for it though (in interactivechange set a flag, check flag in grid.valid).
>>Cetin
>
>>Çetin Basöz
>
>i did not know that a grids textbox would not fire the valid event if clicked outside the grid. i did not understand your reply of set a flag in interactivechange and then check the flag in vlaid. if you can check the flag in valid you are in valid. what does that mean?
>
>also tried to use grid.valid for rec level validation. the grid.valid does not fire when you change rows, so i could not see how it could be used for record level validation. i could not determine under what conditions it did fire.
>
>thanks - brenda
It's a bug and in knowledge base at MS Site it states that it's in VFP 6.0 too. There is no workaround written there. Here is the workaround :
* lhangingvalidation - custom form property
* Grid.valid
return !thisform.lHangingValidation

* Textbox.valid
thisform.lhangingvalidation = (this.value = "1")
* ie: (this.value = "1") would be an invalid input
return !thisform.lhangingvalidation

* Textbox.interactivechange
thisform.lhangingvalidation = (this.value = "1")
You set the flag in textbox.interactivechange, but check in grid.valid. Textbox.valid is not dropped though. Grid.valid doesn't let the scope leave grid so textbox.valid get a chance to complete its job (in grid normal operations it acts as it would normally).
For rec. level normally you would use table valid. But again in grid you would also want to check it in grid.valid (as long as you stay in grid no prob. but when you click outside grid you wouldn't want the rec level validation gone unnoticed especially if you hate default fox messages).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform