I have read several articles on different ways to go about implementing a Nullable DateTimePicker however I am having trouble finding a way using a CalendarColumn. The easiest way I found to have null values in a DateTimePicker was to create a Custom Format if the value equaled an empty string. (Example Below)
'Check for Null Values
If getIssueDetailsHighLevel.Rows(0).Item(6).ToString() = "" Then
DTPReportedToCarrier.Format = DateTimePickerFormat.Custom
DTPReportedToCarrier.CustomFormat = " "
DTPReportedToCarrier.Value.ToString("")
Else
ReportedToCarrier = CDate(getIssueDetailsHighLevel.Rows(0).Item(6))
DTPReportedToCarrier.Value = ReportedToCarrier
DTPReportedToCarrier.Format = DateTimePickerFormat.Long
End If
I would like to find a way to use this same technique with a CalendarColumn but I'm having trouble figuring out how to go about this. My thoughts are I need to check the datagridview cells value and if it is an empty string then I need to change the format on the calendarcolumn for that cell. Can someone please provide me with some example code on how I can go about doing this?
Thanks so much!!