I have I am trying to place a edit on a datagridview row. If a user tries to update any field on the current row on the DVG but has not selected a optioninthe combobox. I want to display a message and put the cursor on the combo box field on that row. I have searched fora awhile thismorning but have yet to find a way.
var selectedValue = dgvShift_Printers.CurrentRow.Cells["dgvCbPrinter"].Value;
if ( selectedValue == DBNull.Value || string.IsNullOrEmpty((string)selectedValue) )
{
MessageBox.Show("You must select a printer before continuing! ");
shift_LogBindingSource.CancelEdit();
// Set focus to the combobox
return;
}