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 f
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 try to use datagridview's as little as possible as they are very complex. I would use a listbox as it populates much quicker.
I would use a listview, it does not have the same problems as a datagridview does.
How about trying a List and adding it programmatically to a multiline textbox. That is very fast and efficient.
Dim tbox As New TextBox
Dim bobs As New List(Of String)
bobs.Add("Williams")
bobs.Add("Stephens")
bobs.Add("Thomas")
bobs.Add("Brown")
bobs.Add("Knauff")
For Each str As String In dinosaurs
tbox.Text &= str & vbNewLine ' &= ensures you add the str not overwrite the previous data/vbnewline works as a cr(carriage return) and an lf(line feed)'
Next