Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

position grid data on refresh

Status
Not open for further replies.

mallee

Programmer
Nov 7, 2000
116
Hello again, haven't needed help for awhile, guess I am starting to get a feel for VFP 6.
My problem is that I have a grid filled by a dbf. I want to fill the grid completely each time it is shown, so I put
go bottom in grid init event, works great. Problem is, I leave the grid to go to another screen, add some records to my grids source dbf and the return to the form with the grid. When I return the grid will not be full, it may show 3 or 4 records and the rest all white (empty). I tried go bottom then refresh. I tried go bottom, skip -12 (size of grid) and doscroll x12 no help.
I checked the dbf and it is at the last record.
Can i use
with thisform
.grid1.init
in some fashion to set focus to bottom of grid ?

I simply want it to be full if there is enough records 12 to fill it up.

Thanks in advance for suggestions.
 
This may sound weird, but try it. It worked for me when my grid was moving around on me.

Do this in your Form.Activate() event:
[tt]
thisform.grid1.refresh()
thisform.grid1.setfocus()
[/tt]
It's a wild stab in the dark, but sometimes VFP acts a bit strange...

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top