Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validation inside a grid!!!????!!!???
Message
 
To
18/06/1998 14:17:57
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00109615
Message ID:
00109729
Views:
16
Hi Tim,

I would rather make this a business rule and set it in the field's validation. This way you can handle the error and display appropriate messages.

Though, if you require to do it this way you could create a flag via a property on the form and set this flag from the When() event of the buttons. Your valid could check for this flag and not display the messagebox.

But still... you might end up creating a new problem here... because the data would not be right if the amount is 0 and the user clicks on the Add button.

>I have a simple grid. There is an amount field that I want to be greater than zero. In the valid, I check for this.value > 0, if not true, I display a messagebox and return .F.
>
>Works great when I am trying to click anywhere in the grid....BUT....if I click on either the "ADD" or "DELETE" command buttons below the grid, the valid message fires, but focus seems to be set on the command button. I can click the same button again and the amount valid does not fire.
>
>If I don't click on the same button again, and try to type a valid amount, the typing does nothing, because focus is on the button.
>
>If I disable the buttons when the valid returns .F., focus seems to go into never never land.
>
>Can someone help....? Thanks....Tim
Previous
Reply
Map
View

Click here to load this message in the networking platform