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

Flexgrid runs away....

Status
Not open for further replies.

OrthoDocSoft

Programmer
May 7, 2004
291
0
0
US
Folks,

You haven't heard from me in awhile because I am on my 69th revision of my first app installed in my hospital. It's going well, thanks to many of you!

But I have somewhat of a niggling problem I can't fix: When I click the down or up arrows on my flexgrid scroll bars, sometimes the rows just "run away" and go much further than the "one click" should take it.

Put a different way, I do not seem to have precise control over "where" I end up on my grid, given a standard number of clicks on the arrows.

Anyone seen this and know how to fix it?

Thanks,

Ortho

[lookaround] "you cain't fix 'stupid'...
 
Do you have any code in the

Private Sub MSFlexGrid1_Scroll()

event?
 
CP60

Thank you.

Most of the scroll events are empty. I just added:

Code:
DoEvents
to most of them and that helped, but didn't entirely eliminate the problem

ortho

[lookaround] "you cain't fix 'stupid'...
 
Start a new project, add a form and grid, and the code to get the data and add it to the grid, but nothing more than absolutely needed.

Start working from there.

You will find that when such an error like this isn't resoulved within a reasonable amount of time, that this will be your easiest and fastest method of finding the cause of such problems.

 
CP60

Thanks you. I do that actually. I have a ton of little "mini" apps that deal with just one thing. My favorite is "date and time" which I always have a problem remembering how to syntactically write.....

But I don't think that's going to help in this case because NOTHING is in the scroll code! I added "DoEvents" to see if that would help; it has, some, but hasn't eliminated the problem.....

arrgggghhhhh

Ortho

[lookaround] "you cain't fix 'stupid'...
 
> because NOTHING is in the scroll code

Therefore you should try this with simplified code and test as EXE on a different machine.


How many records are loaded in the grid?

Is this a MSFlexGrid or MsHFlexgrid and what version?


If the MSHFlexgrid, is it bound to a recordset or adodc?

In a new form add a grid (unbound) and a module level recordset object
Open the recordset in the form's load event using a static local cursor, (use a large amount of records) and then in code assign (set) MSHFlexgrid's Datasource property to this recordset.

Any problems?




 
CP60

Answers to your questions (and I'm sorry I worded the bit you quoted so poorly; I meant to say "...no code in the scroll event....":

how many records? variable 1 to 1000 or more...

They are MSHFlexGrids, V 6.0, SP4

The grids are not bound ever to any DB functions. I load them the hard way....

To say it again, just to be sure you know what's happening:

There was NO code in the Scroll event of any flex grids. When the scroll event occurred, I simply wanted it to scroll which it does.

But it doesn't seem to know when to stop scrolling after I finish clicking, but only sometimes. Put another way, you could click the scroll bar once, and it would "keep scrolling down...."

This is not a serious problem, so don't work too hard.

And thanks....

Ortho

[lookaround] "you cain't fix 'stupid'...
 
I had asked for the version of the MSHFlexGrid component. Find the component in your system32 or wowsystem64 folder and get the version. This may be helpful.

Put
Debug.? "Scrolled"
in the scroll event and check how many times it gets called when you click once to scroll

Also, please try testing the grid as I suggested
 

Would it be possible that when you click once, your mouse sends several ‘clicks’ instead? Some mice would do that, or not send any ‘clicks’ at all. Sometimes, not always.

Just a guess….


Have fun.

---- Andy
 
In order to eliminate possible problems like that, and also problems with certain component versions, code interferences, is the reason I asked it to be tested on a different machine, and also why I asked a new project with the minimal requirements as I gave be tested, to eliminate other possible factors.

However, I see no results from these specific tests yet, and without it, it makes even that much more of a guessing game for us than it does for the OP.
I suspect the OP just hasn't gotten around to it yet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top