Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Valid method in a grid textboxes
Message
 
 
To
30/03/2001 07:17:39
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00489616
Message ID:
00490309
Views:
8
>Hi Nadya.
>
>>> I have a grid and I placed Valid method for several columns (in their textbox control - I use default textbox). Today I noticed, that this Valid method fires each time, I tab between columns or navigate in a grid. <<
>
>Keep in mind, that there is also a teensy weensy little bug that could thwart your validation in the textboxes.
>
>When moving from a grid to another object on the form, the grid's Valid fires before the valid of the active cell. This is a bug. Normally you would expect to use the control's Valid method to determine whether that control can lose focus. However, when a control is contained within a grid, there are two levels at which focus operates. First, between the control and other controls that are also within the grid. In this context things behave normally.
>
>Second there is the issue of which form object has focus. This bug will bite you when focus is being moved between the grid and another object. It is, as you would expect, the grid’s Valid method that determines whether the grid can lose focus. However, because the grid’s Valid is called before that of any contained control, a contained control cannot prevent the grid from losing focus even though its own validation has failed.
>
>This can and will allow bad data to be entered into the grid.
>
>Marcia

Thanks for the explanation, Marcia. I switched to InteractiveChange of textboxes already. Does Fox Team know about this bug? Would it be fixed in the VFP7.0?

Thanks again.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform