Our Delphi application uses database-bound TcxGridDBColumns to let the user manipulate a ISO 8601-formatted date (YYYY-MM-DD) as a string. I would like to offer the end user a calender-based date picker.
TcxDateEditProperties
can't be used (directly) since the underlying database uses a string field. So to my understanding I'm left with the options to
Create an additional date column (TDateTime DB field) in all tables and convert the date to the ISO 8601 string column on the BeforePost event of TDataSet
Create a custom Tcx***Properties class. This would likely involve inheriting from
TcxPopupEditProperties
.
Since there are many tables affected, I would much rather use #2. Can you point to help documents helping me with that? Or is there a #3?
if what you mean by documents is about writing custom component, then you can see here Creating Custom Delphi Components, as well as the document 'Component Writer's Guide' pdf that comes with Delphi (it has example about customizing DBGrid and navigating months, year and days too). This can be used for starting point for option no.2