Scrolling is slow in MSFlexgrid

Hi

I use the flexgrid control in my application but I find that scrolling it is very slow.

I have three columns on it, one fixed row and populate it with an average of about 50 entries.

Scrolling is very slow, however, and I have no idea what is causing it.  When I scroll down using the arrow keys, the first cell in the next row highlights and then the rest of the cells.  It is that slow!

Does anyone know what is wrong?

Sotiris, CTL Cyprus
scgchAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

watyCommented:
NB : I use the following grid (with VB sources)
http://vbaccelerator.com/codelib/sgrid/sgrid.htm

It is far far better than any other grid on the market
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
charlescopeCommented:
It would help if I could see your code and know which version of VB you have. I use the Flex grid all the time with no performance hit.
0
Jeremy_DCommented:
Waty: this grid has no data-binding, so you can hardly say it's "better than any other grid on the market". It's not even comparable to any other grid, since data-binding is one of the most basic properties provided by datagrids.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

watyCommented:
Yes, it has not data-binding.
For my part, I don't use data-binding, I fill myself my grid, and even this, it is fastest. Of course, you need to add extra code....
0
scgchAuthor Commented:
I would be reluctant to use a new control for this, since I know that other applications using MSFlexGrid have no problem with performance.  I would like, however, to thank Waty for an interesting site which has other controls that may be of use to me.

I am using VB5 and the only event of the grid control I have coded is the click event.  I do not think that this has any effect since even without this event, scrolling is still slow.

Sotiris

0
scgchAuthor Commented:
I would be reluctant to use a new control for this, since I know that other applications using MSFlexGrid have no problem with performance.  I would like, however, to thank Waty for an interesting site which has other controls that may be of use to me.

I am using VB5 and the only event of the grid control I have coded is the click event.  I do not think that this has any effect since even without this event, scrolling is still slow.

Sotiris

0
scgchAuthor Commented:
I would be reluctant to use a new control for this, since I know that other applications using MSFlexGrid have no problem with performance.  I would like, however, to thank Waty for an interesting site which has other controls that may be of use to me.

I am using VB5 and the only event of the grid control I have coded is the click event.  I do not think that this has any effect since even without this event, scrolling is still slow.

Sotiris

0
scgchAuthor Commented:
I would be reluctant to use a new control for this, since I know that other applications using MSFlexGrid have no problem with performance.  I would like, however, to thank Waty for an interesting site which has other controls that may be of use to me.

I am using VB5 and the only event of the grid control I have coded is the click event.  I do not think that this has any effect since even without this event, scrolling is still slow.

Sotiris

0
Jeremy_DCommented:
scqch: Stop hitting the refresh button! You're flooding my mailbox ;-))
0
scgchAuthor Commented:
I apologize!  I did not know that the refresh button resubmits my comment.  This then explains why I have three entries of the same comment (mine).  I was wondering about that...
0
AnswerTheManCommented:
is it possible that your HEAVY use of the browser's REFRESH option causes your machine to be slow and that's the reason for that grid slow behaviour ?????

now, does that grid is bounded from design time ?
if yes - try to CUT all its binding props at design time, and just bind it at run time to an already open recordset.
just as it filled - close that recordset.
try to scroll now.
any improvments ?
0
scgchAuthor Commented:
I again want to say to you all that I did not know that the refresh button resubmits my comment.  Please forgive me...

Through all your useful comments I have solved the problem.  No, the control is not databound.  I am retrieving fields from a database and populating the control using RDO functionality.  Even though the fields (strings) are fairly small in size when I put them into the database, when I retrieve them they take the maximum size allowable for that field.  This fills the control with very large strings, hence the slowness.  The problem is solved by trimming the fields before assigning them to the control.

Thanks again for all your useful comments.  I'll give the points to Waty for suggesting a great VB site full of freebies that may be useful to me in other areas.

Sotiris Georgiou, CTL Cyprus.
0
Jeremy_DCommented:
scqch: What database are you using? Try finding something like varchar in stead of (fixed length) char. This will not take up more space for your strings than actually needed to store them.
0
scgchAuthor Commented:
Thanks Jeremy_D.

I am using Informix.  I will certainly look at what you have suggested.

Regards
Sotiris Georgiou, CTL Cyprus
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.