How to give code in C#.NET for deleting a row from a datagridview?
How to give code in C#.NET for deleting a row from a Datagridview tool by simply selecting it or else in the click event of a button? what is the error in this code?
Code:
SqlConnection con = new SqlConnection("server=INTEL-C222E9040\\SQLEXPRESS;Database=internetspammonitor;uid=sa;pwd=123;");
con.Open();
string loc =(dataGridView1.SelectedRows[0].Cells[1].Value).ToString();