As the title tell, i want to delete a row from a data grid view and also it updates in the sql table.

I have this code so far :

DialogResult dr;

            dr = MessageBox.Show("Are you sure ?" , "Rent Returned", MessageBoxButtons.YesNoCancel);

            if (dr == DialogResult.Yes)
            {
                if (this.dgvRent.SelectedRows.Count > 0)
                {
                    dgvRent.Rows.RemoveAt(this.dgvRent.SelectedRows[0].Index);
                }
            }
            else
            {
                MessageBox.Show("Cancelled");
            }

thanks

Hi,
The main question is, are data in DGV bound to some collection (datatable for instance)?