Data formatting (Blazor)

To format data in Radzen Blazor applications use the ToString method and specify a format expression.

String formatting

The standard ToUpper and ToLower methods allow you to transform the string casing.

  • Uppercase: ${stringProperty.ToUpper()}
  • Lowercase: ${stringProperty.ToLower()}

Number formatting

You can use standard and custom .NET number format strings.

  • Currency formatting: ${numberProperty.ToString("C0")}
  • Percent formatting: ${numberProperty.ToString("P")}
  • Custom formatting: ${numberProperty.ToString("00.00")}

Date formatting

Both standard and custom date formats are supported.

  • Standard Date formatting: ${dateProperty.ToString("d")}
  • Custom Date formatting: ${dateProperty.ToString("dd/MM/yyyy")}