Get Datagridview cell in edit mode programmatically VB.NET

If you have a program where you press Edit button and it will put the current datagridview cell in Edit mode (without the need to DOUBLE CLICK cell/or F2 to enter into edit mode), then please find the solution below.

Dim prevCol As Integer = grdMaint.CurrentCell.ColumnIndex
Dim prevRow As Integer = grdMaint.CurrentCell.RowIndex

grdMaint.CurrentCell = grdMaint.Rows(prevRow).Cells(prevCol)
grdMaint.BeginEdit(True)

One Response to Get Datagridview cell in edit mode programmatically VB.NET

  1. Buslama says:

    SendKeys.Send(“{1}”)
    SendKeys.Send(“{BACKSPACE}”)

Leave a comment