Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Slow nested grid performance

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

Slow nested grid performance
Link Posted: 10-Apr-2007 08:22
I have a data-bound read only flygrid.  It has somewhere between 100 and 10000 rows in it, and each row has a single nested row with a separate set of columns.

The top-level columns are mostly smartfit, and one is autoheight, so displaying, sorting, and filtering is understandably a bit slow - it takes about 4 seconds to redraw the 10000 row flygrid on any sort or resize operation.

The nested columns are all exact fit, default options, yet when I expand any node, it takes about four times longer to expand than it did to just display the initial table.  For instance, if I expand one of the nodes in the 10000 row flygrid, it takes about 15 seconds, despite not really having to reflow anything.  It even takes about 8 seconds to collapse the node.

Is there any way to make the expand/collapse node times comparable to the top-level display times?  If it were 4 or 5 seconds for a 10000 row grid, it would be just fine.
Link Posted: 11-Apr-2007 04:17
I ended up working around this problem: I put code that set some of the columns to SmartFit inside BeginInit, right before loading data.  Then, right after EndInit, I recorded the width of those columns, set the FitMode to Exact, then set their widths to the old SmartFit width.

That way, it froze each column at the correct width.  It doesn't reflow widths on a sort operation anymore, but that wasn't really important anyway.