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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force Scroll in a MsFlexGrid

Status
Not open for further replies.

crisedefoie

Programmer
Feb 19, 2003
39
CA
I have a MSFlexGrid in a VB6 form that I fill with many records (and I can't see all records without scrolling).

I want to force the scrollbar to the bottom of the grid because the user of my application want to be able to see the last record. But I don't see how :-(

I hope I was clear enough, English is not my usual language.
 
Move to the last record in the recordset that's being displayed, and refresh the grid if you need to.
 
It's a MSFlexGrid not a DataGrid.

I offered to my client to displayed records by descending order but he doesn't want.

Thanks for reply
 
Just set the .TopRow property to scroll.

Code:
flx.TopRow = 6

David
 
I was thinking MSHFlexGrid, which is no excuse since my solution doesn't work anyway. dg's does work. You can say
Code:
flx.TopRow = flx.Rows
Although TopRow can't be as high as the number of rows in the grid, it will set to the highest possible number if you set it too high.

Sorry for the red herring,

Bob
 
TopRow property works fine !!!!!


It's a shame I didn't find it by myself self [sad]

Thank you very much.
 
Well, I didn't either, David did. :) By the way, if you move to the MSHFlexGrid (hierarchical flexgrid) you'll find that it errors out if the toprow property is set to more than the total number of rows minus the number of rows the grid will show.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top