Incorrect culture handling in RadzenDataGridColumn #683

Closed
opened 2026-01-29 17:41:34 +00:00 by claunia · 0 comments
Owner

Originally created by @adumais on GitHub (Dec 23, 2022).

Describe the bug
RadzenDataGridColumn doesn't consider the DataGrid culture when formatting its value for display.

To Reproduce
In a RadzenDataGrid with one RadzenDataGridColumn of type DateTime, specify an explicit culture that is not the system default one, ex:

Culture=@(CultureInfo.GetCultureInfo("fr-CA"))

On the column, use a format string that displays the textual month, ex:

FormatString="{0:M}"

The displayed date will not consider the explicitely specified culture.

Expected behavior
The culture is correctly considered, as it is the case in the RadzenDatePicker for instance.

Screenshots
The issue is with the order of the arguments in the string.Format call here, where the IFormatProvider should be the first argument:

image

Desktop:

  • OS: Windows
  • Browser Chrome
Originally created by @adumais on GitHub (Dec 23, 2022). **Describe the bug** RadzenDataGridColumn doesn't consider the DataGrid culture when formatting its value for display. **To Reproduce** In a RadzenDataGrid with one RadzenDataGridColumn of type DateTime, specify an explicit culture that is not the system default one, ex: Culture=@(CultureInfo.GetCultureInfo("fr-CA")) On the column, use a format string that displays the textual month, ex: FormatString="{0:M}" The displayed date will not consider the explicitely specified culture. **Expected behavior** The culture is correctly considered, as it is the case in the RadzenDatePicker for instance. **Screenshots** The issue is with the order of the arguments in the string.Format call here, where the IFormatProvider should be the first argument: ![image](https://user-images.githubusercontent.com/8060843/209351935-e7aa1d7b-4b69-4bf1-b871-94bd019994cc.png) **Desktop:** - OS: Windows - Browser Chrome
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#683