Link to home
Start Free TrialLog in
Avatar of mmcmillen
mmcmillen

asked on

MSHFlexgrid issue

I am using a MSHFlexgrid in VB 6.0.   This grid is on a frame .   I access the frame by clicking antoher grid to grab a record, then clicking a button .  this button clears the grid , populates it.  Displays the frame.  This works fine.   the issue is this.     Lets say the first time the grid is displayed it shows 100 records but I use scroll bar to see them.  When I go back and reselect new data to look at, click the button, clear the grid, populate the grid, display the frame   the scroll bar is at the position last used,  scrolled down, not at the top or first record of the grid.    I have never had this problem but suspect it has something to do with the grid being on the same form.  Other ties I have used grids they were on different forms and thus all the settings were reset, I believe.  Any ideas if that is the case and how to get the scroll bar to set correctly?   Also,  any idea why snice moving to XP my wheel mouse doesnt work on grids in vb 6?
Avatar of 23637269
23637269
Flag of United States of America image

You can set the scrollbar's Min to 1 and max to RecordCount and then set the value to whatevery you want.
Depending on the control object you use you may need to send:
ControlName.Update  or  ControlName.Refresh
Avatar of mmcmillen
mmcmillen

ASKER

how do I do that on a MSHFlexgrid?  I dont see any properties specifically for the scrollbar.  
ASKER CERTIFIED SOLUTION
Avatar of 23637269
23637269
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I fixed it.    I used   grd.rows =  my default value of rows for the grid.    Thanks for the help .   Not exactly the answer but got me looking in the right place.