My datagridview flickers and is very slow while loading. I reflectored the datgridview from Microsoft and discovered that there is a back buffer property which is not visible from the winForm. How do I set this property?
For some reason Microsoft put the DoubleBuffered property in there, but didn't allow us to turn it on. You can hijack the system by using SubClassing.
Public Class MyDataGridView
Inherits DataGridView
Sub New()
MyBase.New()
Me.DoubleBuffered = True
End Sub
End Class
In your program you can then Build it and the new class should pop up in your toolbox. Once there you are free to drag it out and use it as if it were a normal DataGridView with better drawing capabilities.
Hope this helps.
I would use a listview, it does not have the same problems as a datagridview does.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With