We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Resource key query for DataGrid translation

Thread ID:

Created:

Updated:

Platform:

Replies:

148233 Oct 10,2019 06:21 PM UTC Oct 11,2019 11:00 AM UTC WPF 1
loading
Tags: SfDataGrid
Tech Shop
Asked On October 10, 2019 06:21 PM UTC

Hello

I'm working on a SfDataGrid, I did the translation as it is at https://help.syncfusion.com/wpf/datagrid/localization, but two items I don't know what is the translation key. Note that resource image has the key "SelectAll", which translating to Portuguese is "Selecionar todos". But I need the key to translate "True" and "False", according to the filter image of SfDataGrid. I looked for the key in the documentation and couldn't find it. Could you let me know?

Attachment: localization_2d46961c.rar

Mohanram Anbukkarasu [Syncfusion]
Replied On October 11, 2019 11:00 AM UTC

Hi Tech Shop,   
  
Thanks for contacting Syncfusion support.   
  
We have checked the reported scenario and it is not possible to provide key to translate the strings True and False. However, you can change the text displayed in the filter control as per your requirement by setting CheckBoxFilterControl.ItemTemplate as given in the below code example.   
  
Code example:    
  
<syncfusion:GridCheckBoxColumn.FilterPopupStyle>   
                                <Style TargetType="syncfusion:GridFilterControl">   
                                    <Setter Property="CheckboxFilterStyle">   
                                        <Setter.Value>   
                                            <StyleTargetType="syncfusion:CheckboxFilterControl">   
                                                <Setter Property="Background"Value="Red"/>   
                                                <Setter Property="ItemTemplate">   
                                                    <Setter.Value>   
                                                        <DataTemplate>   
                                                            <CheckBox Margin="4"   
            HorizontalAlignment="Stretch"   
            HorizontalContentAlignment="Stretch"   
            Focusable="False"   
            Content="{Binding Converter={StaticResource boolConverter}}"             
            FontWeight="{Binding FontWeight,RelativeSource={RelativeSource Self}}"   
            Foreground="{Binding Foreground,RelativeSource={RelativeSource Self}}"   
            IsChecked="{Binding IsSelected,   
                                Mode=TwoWay}">   
                                                            </CheckBox>   
                                                        </DataTemplate>   
                                                    </Setter.Value>   
                                                </Setter>   
                                            </Style>   
                                        </Setter.Value>   
                                    </Setter>   
                                </Style>   
                            </syncfusion:GridCheckBoxColumn.FilterPopupStyle>   
   
   
   
public class BoolConverter : IValueConverter   
{   
    public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)   
    {   
        if ((value as FilterElement).DisplayText == "True")   
            return "Yes";   
        else   
            return "No";   
           
    }   
   
    public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)   
    {   
        return null;   
    }   
}   
  


 
 
We have prepared a sample for your reference and it is available in the below link.   
  
  
Please let us know if you need further assistance from us.   
  
Regards,   
Mohanram A  



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon