Hello,
I have successfully created a dynamic grid to view data from different CSV files. I am now trying to apply C2 Format to certain columns, but the formatting is not being applied. This is the code I'm using:
foreach(var cf in Grid1.Columns)
{
var htxt = cf.HeaderText;
if (DateColumns.Contains(htxt))
cf.Format = "d";
else if (CurrencyColumns.Contains(htxt))
cf.Format = "C2";
};
This is code is run within OnInitializedAsync, after data from the CSV has been loaded.
The Grid displays correctly, except for the formats not being applied.
The latest thing I've tried is:
await Grid1.RefreshColumnsAsync();
StateHasChanged();
But still nothing.
It feels I'm missing something obvious. Can you please help?
Regards
Furio Filoseta