I have a grid that shows a score which should be a percent. I have the column setup:
It's coming out as:
What can I do to make the format correct?
Template value is:
${getBbsAuditsResult.Where(r => r.id == data.BbsSchedule1.AuditID).FirstOrDefault()?.Score}
enchev
2
Hi @kest874,
When you set Template you need to apply format manually - i.e. ToString() with desired format.
I changed to:
${getBbsAuditsResult.Where(r => r.id == data.BbsSchedule1.AuditID).FirstOrDefault()?.Score.ToString("P")}
based on Data formatting (Blazor) (radzen.com)
But I get error CS1501: No overload for method 'ToString' takes 1 arguments
This worked for me:
${string.Format("{0:p0}", getBbsAuditsResult.Where(r => r.id == data.BbsSchedule1.AuditID).FirstOrDefault()?.Score)}
1 Like