Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Please Help !!! Valid Method ???
Message
From
01/09/1998 03:28:22
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00131529
Message ID:
00131806
Views:
30
>Do you know why when you return .F. within a valid method of textbox in a grid it lose the focus anyway if you click on another object.
>
>Note: the Textbox control work fine if it's not in a grid
>
>All idea or suggestion will appreciate
>Thank's in advance
Hi Rock,
As Ken pointed out it's documented in BUG: Focus Changes Even Though Grid Text Box Valid Returns .F. with no workaround. I commented there a workaround but think it'll never appear there (huh just 255 chars limited commenting).
Workaround consists of flagging hanging validations and grid.valid checking it.
* Custom grid or form property lHangingValidation (Grid preferred)
* A valid.event of textbox
if ....
  lHangingValidation = .t.
else
  lHangingValidation = .f.
endif
return !lHangingValidation

* Grid.valid
if ....
   return .f.
else
   return !lHangingValidation
endif
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform