Format Decimal as a percent

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 => == data.BbsSchedule1.AuditID).FirstOrDefault()?.Score}

Hi @kest874,

When you set Template you need to apply format manually - i.e. ToString() with desired format.

I changed to:
${getBbsAuditsResult.Where(r => == data.BbsSchedule1.AuditID).FirstOrDefault()?.Score.ToString("P")}

based on Data formatting (Blazor) (

But I get error CS1501: No overload for method 'ToString' takes 1 arguments

This worked for me:

${string.Format("{0:p0}", getBbsAuditsResult.Where(r => == data.BbsSchedule1.AuditID).FirstOrDefault()?.Score)}

1 Like