My understanding is that you have a datagridview bound to a database and user enters new rows and your problem is if the user enters a wrong data, you should be able to highlight the row in the datagrid view and delete it by a click of a button ?
If that is the case, you can do the following - "dg" is the name of my datagridview
private void button1_Click(object sender, EventArgs e)
{
try
{
dg.Rows.Remove(dg.CurrentRow);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}