Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opinion on Spinner and Grid refresh
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00117128
Message ID:
00117145
Views:
17
Hi Mark,

How about putting the requery code in the .UpClick and .DownClick events of the spinner. The trouble with .InteractiveChange is that it will fire with every keystroke if the user types a value in the spinner (i.e. 1998 fires .InteractiveChange 4 times). For the issue of the user typing in the year I would either not allow it by trapping keystrokes or put the requery code in the .LostFocus or .Valid events. HTH


>I have a simple form with a spinner where a user can change the year to display data in a grid for. The grid has a parameterized view (LogFile.Year = ?lnYear) where lnYear is derived from the value of the spinner. When the user spins the spinner, at what point would you Requery() the view to refresh the data in the grid?
>
>I have thought about the InteractiveChange but that could fire off the requery too often and degrade performance. I thought about LostFocus but then nothing is refreshed or requeried until the control loses focus. The user wonders why nothing is happening. I thought about a timer to start when InterActiveChange fires. If a certain amount of time lapses, then fire requery. This adds more complication than may be necessary.
>
>Just thought I would get some opinions.
>
>TIA.
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Reply
Map
View

Click here to load this message in the networking platform