private static string Convert(DatumType datumType) { if (datumType != DatumType.None) { return datumType.ToString(); } else { return noSelect; } }
private void otherAttributes_CellContentClick(object sender, DataGridViewCellEventArgs e) { var senderGrid = (DataGridView)sender; if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex >= 0) { var form = new DatumForm(); if (DialogResult.OK == form.ShowDialog()) { DatumType value = form.Datum; senderGrid.Rows[e.RowIndex].Cells[1].Value = value.ToString(); } } }