private void delete__Click(object sender, EventArgs e) { int curruentRow = dataGridView1.CurrentCell.RowIndex; DataGridViewRow selectedRow = dataGridView1.Rows[curruentRow]; dataGridView1.Rows.Remove(dataGridView1.Rows[curruentRow]); Student.delete_student(curruentRow); //MessageBox.Show(curruentRow.ToString()); }