Use this code to Delete Row From DataGridView
if (this.dataGridView1.SelectedRows.Count > 0)
{
dataGridView1.Rows.RemoveAt(this.dataGridView1.SelectedRows[0].Index);
}
and This code for Delete data from Database
first of all you find and store primary field data in a Temp variable and pass this variable in where clause
Ex:-
if your primary field name is Emp_Id and it's it's position in Grid is cell[0]
then
int Primary_Field_Value =dataGridView1[Column_Index,Row_Index].value.Tostring();
SqlCommand cmd = new SqlCommand ("Delete from table where id='"+ Primary_Field_Value +"'",ConnectionObject);
cmd.ExecutenonQuery();
Thanks & Regard
Sham :)