Answers for "delete selected cells in Datagridview"

C#
0

delete selected cells in Datagridview

private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
{
    if (e.KeyCode == Keys.Delete)
    {
        foreach (DataGridViewCell cell in dataGridView1.SelectedCells)
        {
            cell.Value = "";
        }
        e.Handled = true;
    }
}
Posted by: Guest on December-02-2020

Code answers related to "delete selected cells in Datagridview"

C# Answers by Framework

Browse Popular Code Answers by Language