DataGridView deleting first row

Feb 15 2007 7:12 PM
I have this routine that runs when the use clicks delete on a dgv row, but it keeps deleting the first row in the dgv no matter which row i have selected;

private void dgvDelays_UserDeletedRow(object sender, DataGridViewRowEventArgs e)
        {
            DataRowView selectedRow2 = (DataRowView)bindingDataDelays.Current;

            if (selectedRow2 == null)
            {
                return;
            }

            _delayID = Convert.ToInt32(selectedRow2["DelayID"]);

            DataRow[] currentRows2 = DataComponents.ShiftData.tblUnitDelays
                    .Select("DelayID = " + _delayID);

foreach (ShiftDataSet.tblUnitDelaysRow row in currentRows2)
{
                    row.Delete();
}

                UpdateDelay();
        }