Hello,
I have a tablle with columns like startDate and finishedDate of some service. If Service is not finnished I received default DateTime - 01/01/0001 from the database. I would like to display a string like "in progress" or "not finished" etc. Insted Of 01/01/0001.
With best regards Jarosalaw
Hello,
Thank you for your quick reply.
1.In the table two of the columns are DateTime - ReceivedDate and IssuedDate. When a new comission is being opend the value in ReceiveDate is DateTime.Now and in IssuedDate is null.
On the front-end (blazor) I would like to display a string value (e.g. "In Progress") instead of blank space.
How I could do it?
2. A default value it was my mistake, I was paasing default value to the back-end. Now its null value.
4.
<SfGrid DataSource="@Laundries" AllowPaging="true">
<GridPageSettings PageSize="10" PageCount="5" PageSizes="@pagerDropdown"></GridPageSettings>
<GridColumns>
<GridColumn Field=@nameof(LaundryService.Id) HeaderText="ID"></GridColumn>
<GridColumn Field=@nameof(LaundryService.Name) HeaderText="Service Name"></GridColumn>
<GridColumn Field=@nameof(LaundryService.Number) HeaderText="Number"></GridColumn>
<GridColumn Field=@nameof(LaundryService.RecievedDate) Format="d" HeaderText="Recieved Date"></GridColumn>
<GridColumn Field=@nameof(LaundryService.IssuedDate) Format="d" HeaderText="Issued Date*"></GridColumn>
<GridColumn Field=@nameof(LaundryService.IsFinished) HeaderText="Is Finished"></GridColumn>
</GridColumns>
</SfGrid>
With best regards Jarosław
|
<GridColumn Field=@nameof(Order.OrderDate) HeaderText=" Order Date" EditType="EditType.DatePickerEdit" Format="d" TextAlign="TextAlign.Right" Width="130" Type="ColumnType.Date">
<Template>
@{
var con = context as Order;
if (con.OrderDate == null)
{
<span>Inprogress</span>
}
else {
<span>@(String.Format("{0:d}", con.OrderDate))</span>
}
}
</Template>
</GridColumn> |
Thank you! It works perfectly.
With best regards
Jarosław Bolejko