Posted 15 July 2026, 5:56 pm EST
I have a class with several properties, and some are DateTimes. I have a FlexGrid with AutoGenerateColumns turned on. I saw that it was assigning a GridDateTimeColumn to the column which has a mode for GridDateTimeColumnMode but this only has values for Time or Date which use a C1TimePicker and C1DatePicker respectively.
I tried setting up a custom GridCellFactory and in CreateCellEditor i did this:
if (Grid.GetCellValue(range) is DateTime datetime)
return new C1DateTimePicker(){DateTime = dateTime};
return base.CreateCellEditor(range);
This will show the C1DateTimePicker when editing the cells now, but I can’t figure out how to apply the value. By default, it just errors out because it calls GridDateTimeColumn’s GetEditorValue and tries to cast my editor to either a C1DatePicker or a C1TimeEditor and both cast fail. I believe it would fail with other GridColumn types since they similarly cast the editor to a type.
Any ideas?
