       private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridView1.CurrentCell.Value.ToString().Trim() == "Delete")
            {
                dataGridView1.ReadOnly = false;
                dataGridView1.AllowUserToDeleteRows = true;
                string strcon;
                strcon = "Data Source= RAYANEH-C5E4683\\SQLEXPRESS;Initial Catalog=Student;Integrated Security=True";
                SqlConnection con;
                con = new SqlConnection(strcon);
                con.Open();
                String sn;
                SqlCommand cmd = new SqlCommand();
                string sqlDel;
                sn = dataGridView1.CurrentRow.Cells[1].Value.ToString();
                sqlDel = "DELETE FROM stTable WHERE stNo = " + sn;
                cmd.CommandText = sqlDel;
                cmd.Connection = con;
                cmd.ExecuteNonQuery();
                this.studentDataSet.stTable.Clear();
                this.stTableTableAdapter.Fill(this.studentDataSet.stTable);
                dataGridView1.Update();
                con.Close();
                dataGridView1.ReadOnly = true;
            }
