Solve your doubts and expand your knowledge with IDNLearn.com's extensive Q&A database. Join our community to receive timely and reliable responses to your questions from knowledgeable professionals.
Explanation:
private void btnDelete_Click(object sender, EventArgs e)
{
if (this.dataGridView1.SelectedRows.Count > 0)
{
dataGridView1.Rows.RemoveAt(this.dataGridView1.SelectedRows[0].Index);
}
}