Hi,
Is your grid bound to a data source? If so then you should be adding and deleting rows in that data source, not the grid. If the grid is unbound then you call the Add and Remove methods of the grid's Rows collection.
Adding a row to datagridview with textBox columns
Dim dgvRow As New DataGridViewRow
Dim dgvCell As DataGridViewCell
dgvCell = New DataGridViewTextBoxCell()
dgvCell.Value = "anis"
dgvRow.Cells.Add(dgvCell)
dgvCell = New DataGridViewTextBoxCell()
dgvCell.Value = "khan"
dgvRow.Cells.Add(dgvCell)
DataGridView1.Rows.Add(dgvRow)
and to add multiple rows in access try like following
Dim rsTemp As DAO.Recordset
Dim i As Integer
Set rsTemp = Me.RecordsetClone
rsTemp.MoveFirst
For i = 1 To rsTemp.RecordCount
If Me.CurrentRecord = True Then
CurrentDb.Execute INSERT INTO table (column-1, column-2, ... column-n) VALUES (value-1, value-2, ... value-n);
End If
rsTemp.MoveNext
Next i
rsTemp.Close
Set rsTemp = Nothing
Best Luck
Happy Coding:)