public override void DetachEditingControl() { base.DetachEditingControl(); DataGridViewTimePickerCellControl DatePicker = (DataGridViewTimePickerCellControl)(DataGridView.EditingControl); this.Value = DatePicker.Value; }
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 { } }