Just handle the CellDoubleClick event:
private void myDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (sender is DataGridView dgv)
{
DataGridViewCell cell = dgv.Rows[e.RowIndex].Cells[e.ColumnIndex];
if (cell.Value is string value && value == "N")
{
cell.Value = "Y";
}
}
}
Private Sub myDataGridView_CellDoubleClick(ByVal sender As Object, ByVal e As DataGridViewCellEventArgs)
If TypeOf sender Is DataGridView Then
Dim dgv As DataGridView = CType(sender, DataGridView)
Dim cell As DataGridViewCell = dgv.Rows(e.RowIndex).Cells(e.ColumnIndex)
If TypeOf cell.Value Is String Then
Dim value As String = CStr(cell.Value)
If value = "N" Then
cell.Value = "Y"
End If
End If
End If
End Sub