?
Solved

Scrolling is slow in MSFlexgrid

Posted on 1999-11-25
14
Medium Priority
?
308 Views
Last Modified: 2006-11-17
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
0
Comment
Question by:scgch
  • 7
  • 3
  • 2
  • +2
14 Comments
 
LVL 14

Accepted Solution

by:
waty earned 400 total points
ID: 2234238
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
 
LVL 2

Expert Comment

by:charlescope
ID: 2235118
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
 
LVL 4

Expert Comment

by:Jeremy_D
ID: 2235942
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 new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 14

Expert Comment

by:waty
ID: 2235960
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
 

Author Comment

by:scgch
ID: 2236065
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
 

Author Comment

by:scgch
ID: 2236124
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
 

Author Comment

by:scgch
ID: 2236128
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
 

Author Comment

by:scgch
ID: 2236132
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
 
LVL 4

Expert Comment

by:Jeremy_D
ID: 2236134
scqch: Stop hitting the refresh button! You're flooding my mailbox ;-))
0
 

Author Comment

by:scgch
ID: 2236391
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
 
LVL 5

Expert Comment

by:AnswerTheMan
ID: 2236929
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
 

Author Comment

by:scgch
ID: 2239967
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
 
LVL 4

Expert Comment

by:Jeremy_D
ID: 2241272
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
 

Author Comment

by:scgch
ID: 2242880
Thanks Jeremy_D.

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

Regards
Sotiris Georgiou, CTL Cyprus
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question