Hi,
this DataGridView is really giving me headaches like you can see in all the topics I start :)
This time it's about performance.
I'm using a DataBound DataGridView and performance for painting on it, etc. is good as long as it contains no data :)
However, as soon as I load 10 columns in it with about 200 rows, performance really drops. Resizing the form that contains the grid becomes real slow even with column auto size off. Painting selection rectangle over columns becomes real laggy, etc.
Anybody got some ideas why this could be the case Or is that "to be expected"
Thanks,
Tom

DataGridView - slow
TechFreak
Column auto-size rapidly gets slow as the grid fills, if you're sizing to the entire grid. I hope the speed issues are addressed before release.
---Mike
ctlok83
Rajpreet Singh
The scrolling-problem is directly releated to your CPU power. I have an old 1.7Ghz Xeon and have jerky and laggy scrolling in the DataGridView. A college here have a new machine. 3GHz Xeon and the scrolling goes as fast as I would expect on my machine.
As we are developing windows clients for the future (in production in 2-3 years) I can accept this performance since I would expect our customers at least having 3GHz PCs at that time.
I will still have this old 1.7GHz in 3 years but that just because this company is worse than goverment bureaucracy slowness and to get a new PC I probably would need to get fired and re-hired after someone else adopted this PC :)
Test Me
Torsten Grabs
That's good to hear. I tried RC1, but found it crashes more than Beta, and also some API parameters changed without generating a compiler error, so I'm waiting for the next release before making the change.
---Mike
Aziir
Filling the grid with bound (DataTable) or just pushing cells with text goes acceptable fast even with 10.000 rows but scrolling is WAY to slow and jerky. You might think that 10.000 rows is a bit much but when trying with 300 rows the same slow scrolling problems appears.
Cannot compare with the grid in .net1.1 since then we still used a wrapped c++ grid. But a simple google on datagrids I found a OCX one that is blazingy fast even with 50.000 rows.
We would prefer not to use any 3rd party components but if the DataGridView is so slow that would become our only possibility.
There must be some huge bug in the grid component and if that is not adressed before final release of VS2005 I cannot recommend using the new grid to anyone.
You don't need any advanced test project to test this, just drop a grid on a form and set rowcount to 1000 or something and loop in some strings in the cells and the performance problem is very apperent directly.
smith288
What kind of processors do you guys have Maybe this component is very slow on non-HT processors or something.
IanTedridge
Cheese
thanks,
-mark
DataGridView Program Manager
Microsoft
This post is provided "as-is"
NZ Dev
yes, I also tested on C# Express RC today. Performance looks a bit better though still not at the level of the DataGrid 1.1 control. Sorry but I can't really shoot you the solution because it needs 3rd party login, etc. to pull in data.
Regards,
Tom
ComputerGuru
So, I guess they are not and looks like I have to use another grid control as this is not acceptable for me.
les_ihs
For example, I converted this article over to the new DataGridView:
http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnwinforms/html/dragdrop_datagrid.asp
However, draggin my columns when like 100 rows and 10 columns are loaded is awfully slow. Dragging them on the old DataGrid with 500 row and 10 columns is blazing fast
SAlekseev
I did just find that using the CellPainting event is death. I moved it into the CellFormatting and it's much faster, although you cannot use cell.FormattedValue in there, apparently due to recursion.
---MikeB
dlt
Me.TblSupplementsBindingSource.RaiseListChangedEvents = False
Me.TblSupplementsTableAdapter.Fill(Me.DStblSupplements.tblSupplements)
Me.TblSupplementsBindingSource.RaiseListChangedEvents = True
Me.TblSupplementsBindingSource.ResetBindings(False)
Made a big difference for me.
DaveL