I have a Grid. I introduced a MoneyColumn component and use that column in the middle of the grid amongst other "regular" GridColumn. Yet, the MoneyColumn is displayed as the last column of the grid. It is not displayed at the position at which it is declared within the Grid.
Here is the component:
@using Syncfusion.Blazor.Grids
<GridColumn HeaderText="@HeaderText" TextAlign="TextAlign.Right" Width="@Width">
<Template>
@{
var money = Money(context);
if (money >= 0) {<span class ="text-white @PositiveColor p-1 rounded-md">@money.ToString("C2")</span> }
else {<span class ="text-white @NegativeColor p-1 rounded-md">@money.ToString("C2")</span> }
}
</Template>
</GridColumn>
@code {
[Parameter]public string Width { get; set; } = "auto";
[Parameter]public string HeaderText { get; set; } = string.Empty;
[Parameter]public Func<object, decimal> Money { get; set; } = _ => 0M;
[Parameter]public string PositiveColor { get; set; } = string.Empty;
[Parameter]public string NegativeColor { get; set; } = string.Empty;
}