Hi,
I defined in two different grids two DateTimeColumn with timePicker editor . In the first column I have in the column ContextMenu the clear value option while in the other column I don't.
What I am trying to do is letting the user clear the time cell after he filled it by mistake (if he prefers to leave it empty).
Let me know what I am doing wrong .... is it better way to do this ?
I defined in two different grids two DateTimeColumn with timePicker editor . In the first column I have in the column ContextMenu the clear value option while in the other column I don't.
What I am trying to do is letting the user clear the time cell after he filled it by mistake (if he prefers to leave it empty).
Let me know what I am doing wrong .... is it better way to do this ?
// with clear value option
var timeOnlyColumn =
new
GridViewDateTimeColumn
{
HeaderText =
"Time in"
,
Name = Data.cJobCardData.JobCardColumns.DateTimeIn,
FieldName = Data.cJobCardData.JobCardColumns.DateTimeIn,
Format = DateTimePickerFormat.Time,
EditorType = GridViewDateTimeEditorType.TimePicker,
FormatString =
"{0: h:mm tt}"
,
TextAlignment = ContentAlignment.MiddleCenter,
Width = colWidth
};
// No clear value option
var dateColumnIn =
new
GridViewDateTimeColumn
{
HeaderText =
"Date Time In"
,
Name = Data.cJobCardData.JobCardColumns.DateTimeIn,
FieldName = Data.cJobCardData.JobCardColumns.DateTimeIn,
Format = DateTimePickerFormat.Long,
EditorType = GridViewDateTimeEditorType.TimePicker,
FormatString =
"{0: M/d/yyyy h:mm tt}"
,
TextAlignment = ContentAlignment.MiddleCenter,
Width = colWidth
};