can anyone help me to make the following code to delete all the "highlighted" cells(current cells) contents in my datagridview? it always deletes the content of the last selected cell only
Private Sub DataGridView1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles DataGridView1.KeyDown
If e.KeyData = Keys.Delete Then
For Each cell In DataGridView1.SelectedCells
DataGridView1.CurrentCell.Value = ""
Next
End If
End Sub