Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Scrolling
Message
From
29/10/1996 15:50:35
 
 
To
29/10/1996 09:34:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00011067
Message ID:
00011110
Views:
29
>>I have a grid control on a tab into which the user is adding inventory items. As soon as the user exits the final field, LostFocus() triggers the click method of the Save button. It saves the record, and, if the user is in ADD mode, generates the next item # and inserts a new record for the next item. It all works great except...SetFocus().
>>
>>As long as the next record appears without having to scroll the contents of the grid, I figured out how to set focus to the description cell of the new record. However, when the control scrolls, the focus switches to the FIRST visible record's description cell at the top of the grid no matter what I code. Any ideas why and/or how to fix it?
>>
>>Thanks in advance for any help.
>
>It's very unreliable to Save from LostFocus event. What's happened if user will use mouse to change cells? Normally we should use buffering and tableupdate(),tablerevert() functions and referential triggers.

Edward: Thanks for kicking in on this. I didn't make myself very clear, I'm afraid: the LostFocus method kicks in a Save() method that I wrote that invokes TableUpdate, etc. It does not add a new record if a blank one already exists. All of that works great. The problem is the SetFocus() method--I can't get it to set focus on the empty Description cell that has been created if the grid must be scrolled to get to it.

Thanks, again, for your help.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform