Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anyone understand events when clicking outside a grid?
Message
 
 
To
28/09/1998 17:09:33
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00141362
Message ID:
00141832
Views:
23
<snip>

>This is the only kludge I can come up with, and it's as ugly as E.T., but may work in absence of a better solution. The .ControlInGrid property should be .null.ed from QueryUnload and/or Destroy as well, in case the user cancels out (though this case should be better served from the column.text.valid). These two should be repeated for every control in a form and every control in the grid, so it's also very non-OOP (I just hate to cut/paste around, and it's a nightmare to maintain). Sure enough, this can be done by inserting this code in their classes, but then the grid's textbox is always the default textbox unless you explicitly play around it, and there's also lots of other controls that already belong to various classes, so adding this code at a class level just for working around this bu... behavior is nearly an overkill.

>Hopefully this may be a starting point for a real solution.

cetin came up with something that i have been testing, and seems to work. he determines what is the active control in the grid and then in grid.valid "return lastcontrol.valid()". by returning a .f., the grid.valid will stop focus from leaving the grid. grid.valid is also very important to use if you have any row level editing (code in beforerowcolumnchange) you want done before leaving the grid, and staying in the grid if in error. cetins exact code is in this thread. i actually did not use his exactly code, because i always keep track of my lastcontrol. his will work even if you do not.

thanks for your replay. saving it for future ideas.

brenda
Previous
Reply
Map
View

Click here to load this message in the networking platform