Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set Focus to newly appended row on grid
Message
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:
01367153
Views:
11
>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()
>
Append blank
Goto reccount()
ThisForm.grdSample.Refresh()
ThisForm.grdSample.Column1.Text1.SetFocus
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform