General information
Category:
Forms & Form designer
>Hi All,
>
>Does anyone know how to set focus to a record that you append to a grid? I am using an Add button with APPEND BLANK and then myGrid.Setfocus(). A new record is being added to the bottom of the grid (as expected), but the focus jumps immediately from the appended record to the first record of the grid (not expected). Any insights would be appreciated.
There are many ways to do this but you can:
In grid.SetFocus()
dodefault()
go bottom
thisform.refresh()
If you don't want SetFocus to always do this, pass SetFocus a parameter telling it you want to go to the bottom:
Call it this way: grid.SetFocus(.T.)
lparameters plOK
if plOK
dodefault()
go bottom
thisform.refresh()
else
dodefault()
endif
You can also add another param to go to any record you like.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only