How can I delete a newly added row with code in a DataGridview? I cannot find any delete method in any of the features of the DataGridView.
I test for correct data in the _RowValidating event that sets cancel to true. But when the user leaves the row without correcting the value, I set e.cancel = True. But the row is still there with the invalid value in one of the cells. I want to delete the row if the data are not correct and the user navigates away from the row. Can this be done? Is RowValidating event the correct place to do the delete? How and where should I do it?