private void ScannedLineupGridView_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0 || e.RowIndex >= scanned_channels_.Count) { return; } Channel ch = scanned_channels_[e.RowIndex]; ScannedGridColumn column = ScannedColumnToEnum(e.ColumnIndex); switch (column) { case ScannedGridColumn.Listing: new ListingSelectionForm(ch).ShowDialog(); ScannedLineupGridView.InvalidateCell(e.ColumnIndex, e.RowIndex); break; case ScannedGridColumn.Remove: try { ChannelEditing.DeleteChannel(ch); } catch (Exception exc) { new ErrorReporter.ErrorReportingForm("Exception occured when attempting to remove channel.", exc); } SelectAndLoadScannedLineup(scanned_lineup_); break; } }