Okay guys, I got it done (don't know whether it is the right approach yet, however it does support my requirements)
Code bit as below
Code:Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click If (f1.DataGridView1.CurrentRow.IsNewRow) Then f1.DataGridView1.CurrentRow.Cells("itemid").Value = Me.DataGridView1.CurrentRow.Cells("itemid").Value Dim cell As DataGridViewCell = f1.DataGridView1.CurrentRow.Cells("itemname") f1.DataGridView1.CurrentCell = cell f1.DataGridView1.BeginEdit(True) f1.DataGridView1.CurrentCell.Selected = True End If End Sub This way, the button click copies the current form values to main form and sends the focus to the said column. regards,




Reply With Quote
