Completed
Last Updated: 08 Mar 2024 07:12 by ADMIN
Release 5.2.0
Xiaorong
Created on: 13 Sep 2022 18:02
Category: DataGrid
Type: Bug Report
0
DataGrid: [WinUI][Android] Some languages are not properly rendered by SkiaSharp elements

Header Text, group header text, do not display some languages characters like Chinese, Thai, etc.

The root reason for this is the fact that the Skia APIs used to draw the text does not support automatic character fallback.

Workaround:

for header text:

<telerik:DataGridTextColumn.HeaderContentTemplate>
    <DataTemplate>
        <Label Text="your text"></Label>
    </DataTemplate>
</telerik:DataGridTextColumn.HeaderContentTemplate>

group header text

<telerik:RadDataGrid.GroupHeaderTemplate>
        <DataTemplate>
            <Label Text="{Binding Group.Key}"/>
        </DataTemplate>
</telerik:RadDataGrid.GroupHeaderTemplate>

column:

<telerik:DataGridTextColumn HeaderText="Name" >
    <telerik:DataGridTextColumn.CellContentTemplate>
        <DataTemplate>
            <Label Text="{Binding Name}"/>
        </DataTemplate>
    </telerik:DataGridTextColumn.CellContentTemplate>
</telerik:DataGridTextColumn>

1 comment
ADMIN
Didi
Posted on: 08 Mar 2024 07:12

Hello,

The issue is resolved in Telerik MAUI 5.2.0 version. This version and all versions above contain the fix.

In order to display Japanese, Chinese characters, etc. you have to add and register the font in your MAUI application.  How to add and register fonts in your .NET MAUI application is described here: https://learn.microsoft.com/en-us/dotnet/maui/user-interface/fonts?view=net-maui-8.0 

Then you have to set the font family to the HeaderStyle, group style, etc.

 <telerik:DataGridNumericalColumn HeaderText="あああ"
                                  HeaderStyle="{StaticResource headerStyle}"
                                  PropertyName="Value"/>


    <ContentPage.Resources>
        <ResourceDictionary>
            <telerik:DataGridColumnHeaderStyle x:Key="headerStyle" TextFontFamily="JapaneseFont" />
        </ResourceDictionary>
    </ContentPage.Resources>

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.