Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set Focus to newly appended row on grid
Message
From
12/12/2008 20:48:27
Bill Drew
Independent Consultant
Chicago, Illinois, United States
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01367117
Message ID:
01367137
Views:
10
>No matter what code I use, I cannot seem to bring the focus to the newly appended row on a grid. I wonder if anyone else has experienced this and what did you do to resolve it? ActivateCell() doesn't help. Nothing puts the focus to the grid until I take the mouse pointer and click on the grid, then the row is highlighted where I click on it. I want the user to see the focus go immediately to the grid, for data entry, once he has clicked on a button that is for creating new records. The grid data entry is what the users are used to.
>
>Here' some sample code from an INSERT ROW button on the form:
>
>
>APPEND BLANK
>ThisForm.grdSample.ActivateCell(nRowCount + 1, 1)
>ThisForm.grdSample.Column1.Text1.SetFocus
>ThisForm.grdSample.Refresh()
>
I think you need to call Thisform.grdsample.setfocus() ???
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform