Hello,
I have a grid in my Server blazor application and i use Greek regional settings (comma as decimal separator and dot as thousand separator)
A) I have an integer column on my grid and I set format as number:
<GridColumn Field=@nameof(PassengersNumber.Cnt) HeaderText="Number" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Right" Width="140" AllowEditing="false" Visible="true" Format="N0" Type="ColumnType.Number"></GridColumn>
On Grid rows value is displayed properly (with dot as thousand separator) but in summaries is displayed with comma).
B) I have also a double column. I set format as C2:
<GridColumn Field=@nameof(PassengersNumber.Gross) HeaderText="Amount" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Right" Width="140" AllowEditing="false" Visible="true" Format="C2"></GridColumn>
When I am exporting my grid to excel, format to this column is not displaying properly. Thousand separators are missing and decimal digits are 5 instead of 2.
C) I have a DateTime field and i want to display on the column of grid only the time in 24 hours format and only if time is not set to 00:00. With template column i can achieve this:
<GridColumn Field=@nameof(PassengersNumber.DelayTime) HeaderText="Delay Time" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Center" Width="140" AllowEditing="false" Visible="true">
<Template>
@{
var a = context as PassengersNumber;
if (a.DelayTime == new DateTime(1900, 1, 1))
{
<span></span>
}
else
{
<span>@a.DelayTime.ToString("HH:mm")</span>
}
}
</Template>
</GridColumn>
But when i am exporting grid to excel the result is not the same:
If I use below approach i have not the expected results:
<GridColumn Field=@nameof(PassengersNumber.TripTime) HeaderText="Delay Time" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Center" Width="140" AllowEditing="false" Visible="true" CustomFormat="@(new { type = "time", skeleton = "Hm" })" Type="ColumnType.DateTime"></GridColumn>
In Angular Grid if i use the below approach (like the above i used in Blazor), the result is that I expect on my grid and excel export:
<e-column field='TripTime' headerText='Delay type='time' [format]='formatOptions' enableGroupByFormat='true' textAlign='Center' width=80></e-column>
this.formatOptions = { skeleton: 'Hm', type: 'time' }
D) On exported excel summaries are not included:
I have attached a test project
Attachment:
TestBlazor_Sf_7d643a55.7z