コード例 #1
0
 private static string Convert(DatumType datumType)
 {
     if (datumType != DatumType.None)
     {
         return datumType.ToString();
     }
     else
     {
         return noSelect;
     }
 }
コード例 #2
0
        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();
                }
            }
        }