Get Datagridview cell in edit mode programmatically VB.NET
October 2, 2013 1 Comment
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)
SendKeys.Send(“{1}”)
SendKeys.Send(“{BACKSPACE}”)