New to Telerik UI for Blazor? Download free 30-day trial

Value cannot be null. (Parameter 'format')

Environment

Product UI for Blazor

Description

I am getting an error when I am using a Telerik Blazor component in an application with enabled localization.

Error Message

The exact error message can vary. Here are just a few examples:

Unhandled exception rendering component: Value cannot be null. (Parameter 'format')
System.ArgumentNullException: Value cannot be null. (Parameter 'format')
    at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
    at System.String.Format(String format, Object arg0, Object arg1)
    at Telerik.Blazor.Components.TelerikWizard.get_PagerMessage()
System.ArgumentNullException: Value cannot be null. (Parameter 'format')
    at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
    at Telerik.Blazor.Components.Common.Filters.FilterMenu.TelerikFilterMenu.get_FilterMenuSettingsLabel() 

Possible Cause

A similar error can occur if a component is used in a localized application, but the .resx files are missing some keys for the corresponding component.

The app either needs to implement localization for the Telerik components correctly, or not implement a localization service at all. Partial localization is not possible. So, it is essential that the .resx files for the Telerik components are always up-to-date and contain all the necessary keys.

Solution

To solve the issue, make sure that:

Find the latest localization files in two places:

In some cases, you might not get an error, but components may appear partially localized (some texts are missing). More details on that are available at Partially Localized Components, Missing Text, Not Translated Text.

See Also

In this article