Денис писал(а):Не пихать все записи в DataGridView, а оставить их в RecordSet
Dim Data As New Dictionary(Of String, String)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DataGridView1.VirtualMode = True
For i As Integer = Asc("A") To Asc("Z") : DataGridView1.Columns.Add(Chr(i), Chr(i)) : Next
DataGridView1.RowCount = Int16.MaxValue
End Sub
Private Sub DataGridView1_CellValueNeeded(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellValueEventArgs) Handles DataGridView1.CellValueNeeded
Dim key As String = e.ColumnIndex & e.RowIndex
If Data.ContainsKey(key) Then e.Value = Data(key)
End Sub
Private Sub DataGridView1_CellValuePushed(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellValueEventArgs) Handles DataGridView1.CellValuePushed
Dim key As String = e.ColumnIndex & e.RowIndex
If Data.ContainsKey(key) Then Data(key) = e.Value Else Data.Add(key, e.Value)
End Sub
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 19