Пример #1
0
        public override void DetachEditingControl()
        {
            base.DetachEditingControl();

            DataGridViewTimePickerCellControl DatePicker = (DataGridViewTimePickerCellControl)(DataGridView.EditingControl);

            this.Value = DatePicker.Value;
        }
Пример #2
0
        public override void InitializeEditingControl(int rowIndex, object initialFormattedValue, DataGridViewCellStyle dataGridViewCellStyle)
        {
            base.InitializeEditingControl(rowIndex, initialFormattedValue, dataGridViewCellStyle);

            DataGridViewTimePickerCellControl DatePicker = DataGridView.EditingControl as DataGridViewTimePickerCellControl;

            try
            {
                DatePicker.Value = Convert.ToDateTime(this.Value);
            }
            catch { }
        }