Hi,
I have a list of objects that have a member of type Google.Protobuf.WellKnownTypes.Timestamp and I want to display it in a Grid. Here is an excerpt of the class:
class VisitModel {
public Google.Protobuf.WellKnownTypes.Timestamp Executiondatetime;
}
I am trying to display it in a grid like this: (I have removed the HTML <> signs)
RadzenGridColumn TItem="VisitModel" Property="Executiondatetime" Title="Executed On" Width="10px"
Template Context="visit"
@if (visit.Executiondatetime == null)
new String("");
else
new String(String.Format("{0:MM/dd/yyyy h:mm:ss tt}", visit.Executiondatetime.ToDateTimeOffset().LocalDateTime));
Template
RadzenGridColumn
I understand that I must use a template but even if the Executiondatetime is not null, there is nothing displayed in the cell. It is important to mention that IF is not null and the template definition is like this below, it works fine...
@String.Format("{0:MM/dd/yyyy h:mm:ss tt}", visit.Executiondatetime .ToDateTimeOffset().LocalDateTime)
Any advice?
Thanks.