I use the kendo grid, where I added a column of type DateTime that shows the date and time.
The problem I am facing is that if there are none, then by default it shows the value null
.
I want that if the date is not set, it should show an empty cell value instead of zero.
I am using kendo version 2012.2.710.340
.
Declare a field value in a class as follows:
public DateTime? Time { get; set; }
Below is the format I used in the kendo grid to display the datetime field in the grid:
columns.Bound(o => o.Time).Format("{0:MM/dd/yyyy HH:mm:ss}").Title("Time");
I will be grateful if anyone can help me solve my problem.
source
share