Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid row SetFocus after append
Message
From
07/07/2016 14:58:27
 
 
To
07/07/2016 14:44:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01638045
Message ID:
01638063
Views:
56
>>Sorry if I am bringing up a subject that has been dealt with before, but search didn't reveal anything. Googling hasn't revealed any solutions either.
>>
>>I have a grid, and in the RightClick of Header1 of Column1 I have an Append Blank to add a new record to the grid. I need to SetFocus to the Column1.Text1, so the user can enter new info. I can see the new record pop into the grid, as it has a checkbox in one column, but no matter what I do, the cell/row will not 'get focus'. Any help will be most appreciated!
>>
>>Thank you!
>
>I solve those issues always with a timer. Put a timer on the form, interval = 250 and enabled = .F.. In the timer event, put the following code:
>
>THIS.Enabled = .T.
>THISFORM.grd.Column1.SetFocus()
>
>
>Then instead of calling the setfocus method after the append, enable the timer.

Sorry, it must be obviously:
THIS.Enabled = .F.
Christian Isberner
Software Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform