MartinaL Posted February 15, 2007 Posted February 15, 2007 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(); } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.