Hanish Kapoor
'Hope This helps DGV1 is the datagridview
'To copy Row
Private Sub CopyButton_Click(sender As System.Object, e As System.EventArgs) Handles CopyButton.Click
CopyRowIndex = DGV1.CurrentRow.Index
End Sub
'To Paste Row
Private Sub PasteButton_Click(sender As System.Object, e As System.EventArgs) Handles PasteButton.Click
PasteRowIndex = DGV1.CurrentRow.Index
For index As Int32 = 0 To DGV1.ColumnCount - 1
DGV1.Rows(CInt(PasteRowIndex)).Cells(index).Value = DGV1.Rows(CInt(CopyRowIndex)).Cells(index).Value
Next
End Sub
'To Duplicate Rows
Private Sub DuplicateButton_Click(sender As System.Object, e As System.EventArgs) Handles DuplicateButton.Click
CopyRowIndex = DGV1.CurrentRow.Index
DGV1.Rows.Add()
DuplicateRowIndex = DGV1.Rows.Count - 1
For index As Int32 = 0 To DGV1.ColumnCount - 1
DGV1.Rows(CInt(DuplicateRowIndex)).Cells(index).Value = DGV1.Rows(CInt(CopyRowIndex)).Cells(index).Value
Next
End Sub