Hi
I have an issue wherein when the RowLeave event is trigerred ina datagridview, I want to set the focus back to the row where the validation failed. But the cell focus goes to the cell i clicked or tabbed into even though I have set the focus back to the rouge row with a .selected = true property.
I have tried the following with no success...
iRowNumber = timesheetdataGr idView.CurrentC ell.RowIndex;
DataGridViewRow dgvR = timesheetdataGr idView.Rows[iRowNumber];
dgvR.Selected = true;
(OR)
timesheetdataGr idView.Rows[iRowNumber].Selected = true;
timesheetdataGr idView.CurrentC ell = timesheetdataGr idView[0, iRowNumber];
Any and all help is appreciated.
Sonny
I have an issue wherein when the RowLeave event is trigerred ina datagridview, I want to set the focus back to the row where the validation failed. But the cell focus goes to the cell i clicked or tabbed into even though I have set the focus back to the rouge row with a .selected = true property.
I have tried the following with no success...
iRowNumber = timesheetdataGr idView.CurrentC ell.RowIndex;
DataGridViewRow dgvR = timesheetdataGr idView.Rows[iRowNumber];
dgvR.Selected = true;
(OR)
timesheetdataGr idView.Rows[iRowNumber].Selected = true;
timesheetdataGr idView.CurrentC ell = timesheetdataGr idView[0, iRowNumber];
Any and all help is appreciated.
Sonny
Comment