enjoyit
2016-04-18T06:06:24Z
Hi,

i have some performance issues building the grid (takes up to 30 seconds, without autosizing it is only half of a second) when the grid contains a lot of rows (>2000) when i autosize all columns after filling the grid via FillFromRS.

Is it possible that the grid just uses the first 100 rows eg to autosize the columns to make it faster?

I use this function to autosize the columns:

For int_i = 1 To lf_object.ColCount
        
     lf_object.AutoWidthCol int_i

Next int_i


thanks!
Igor/10Tec
2016-04-19T09:35:01Z
First of all, wrap your auto-width-col code with the BeginUpdate/EndUpdate method calls.

The column auto-width operation implies that all column cells are involved into process - unless we cannot calculate the minimal width. And calculating the cell contents width is a complex operation, so it may take some significant amount of time.
enjoyit
2016-04-19T09:48:06Z
I even use the BeginUpdate/EndUpdate method.

I was wondering because the standard listview-Object is a lot faster in this point? 😃
Igor/10Tec
2016-04-19T14:07:29Z
ListView uses much simpler 'cell' layout.

You can also send me a sample that demonstrates your performance problem. I will gladly examine it together with iGrid under the debugger.
Igor/10Tec
2017-03-22T14:13:16Z
We have fixed this problem in iGrid 6.5 released today. The problem was in the dynamic content events (CellDynamicText, CellDynamicFormatting, ...) raised for every cell. This problem was especially noticeable in Microsoft Access - VB6 apps did not suffer from this problem. Now all those dynamic content events are turned off by default, and the performance of AutoWidthCol in MS Access is good enough.

BTW, iGrid 6.5 also introduces one more method to do the auto-width work for all columns in one call - it's AutoWidthCols.