1

I am using msflexgrid in my vb6 application, It do work fine,but if any cell has large content then the problem comes. the problem is that when we navigate in grid by using arrow buttons, navigation becomes very slow when the cell with large content comes to visible area.Otherwise it works fine. In this case i am not trying to open the cell content of grid,just navigating from one cell to another. So how this slow performance or slow navigation can be solved or improved?

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
IT researcher
  • 3,274
  • 17
  • 79
  • 143

3 Answers3

2

Set your Redraw property to false

And set it to true again after update completed.

MikroDel
  • 6,705
  • 7
  • 39
  • 74
  • The problem i have mentioned in my question is problem while we navigate between cells just by using arrow keys.The problem is not during updating.When we navigate between cells navigation becomes slow. – IT researcher Jul 23 '13 at 12:11
1

I know that once I had set autosize column rows on and it caused massive speed issues. Now I leave auto-size off normally, turn it on breifly when the data first loads, and make it an option for the user via context menu.

Don Nickel
  • 154
  • 6
1

I setup a test harness using the Service Pack 6 (latest) version of the MSFlex grid control as follows:

Private Sub Form_Load()
    Dim i, j As Integer
    Dim s As String

    For j = 1 To 500
        For i = 65 To 122
            s = s & Chr(i)
        Next i
    Next j

    For i = 1 To 4
        For j = 1 To 10
            MSFlexGrid.Col = i
            MSFlexGrid.Row = j
            MSFlexGrid.Text = s
        Next j
    Next i
End Sub

The MSFlex Grid control had 5 columns and 50 rows in my case.

This generates about 29K (58 chars * 500 repeats) of data per cell. I can navigate fairly quickly from cell to cell with this test harness. I would suggest that you ensure you are using the latest (SP6) version of the control.

If you are using the SP6 version and the amount of data that you are displaying in each cell is so large that it is still causing a performance issue I would suggest switching to another control.

Possibly integrate a 3rd party VB6 control or leverage something you've written in .NET and integrate into your VB6 form.

Warren Rox
  • 655
  • 2
  • 8
  • 23