Hi,
For displaying datetime values in a RadGrid column I am using a GridBoundColumn with DataType="System.DateTime" and DataFormatString="{0:M/d/yyyy}". This works fine except in cases where the bound value is null (DateTime.MinVal) - the date value is displayed as "1/1/0001".
I could define the column as a string and emit a blank string when the date field is set to DateTime.MinVal, but then I loose the capability of sorting on the date column (unless the date format is "yyyy/MM/dd".
Is there a way to leave the data type of the column as "DateTime" and also display an empty cell if the value of the date is DateTime.MinVal?
For displaying datetime values in a RadGrid column I am using a GridBoundColumn with DataType="System.DateTime" and DataFormatString="{0:M/d/yyyy}". This works fine except in cases where the bound value is null (DateTime.MinVal) - the date value is displayed as "1/1/0001".
I could define the column as a string and emit a blank string when the date field is set to DateTime.MinVal, but then I loose the capability of sorting on the date column (unless the date format is "yyyy/MM/dd".
Is there a way to leave the data type of the column as "DateTime" and also display an empty cell if the value of the date is DateTime.MinVal?