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. Image for the cookie policy date

Textfilter does not show first underscore

Hello Syncfusion-Team,

I have a display problem within the textfilter of the SfDataGrid. In the SfDataGrid the texts are displayed correct. But when opening the filter the first underscore is not shown even though the input notes it. In the attached pictures you can see the issue.


Is this a bug within the filter of the SfDataGrid or do I have to change a property at the SfDataGrid?


Kind regards,

Nathalie Kreis

Attachment: SfDataGrid_Filter_Underscore_8e035af1.7z

1 Reply

AA Arulraj A Syncfusion Team January 18, 2019 10:10 AM UTC

Hi Nathalie, 

Thanks for using Syncfusion product. 

By default the first underscore will not be displayed on the check box and it is the behavior of the CheckBox. Please refer the following links.  


However you can resolve this by customizing the style of CheckboxFilterControl. Please refer the following code example. 

Code example :  
<DataTemplate x:Key="CheckboxFilterControlItemTemplate">  
            <StackPanel HorizontalAlignment="Stretch" Orientation="Horizontal">  
                <CheckBox Margin="4"  
            HorizontalAlignment="Stretch"  
            HorizontalContentAlignment="Stretch"  
            Focusable="False"  
            FontFamily="{Binding FontFamily,RelativeSource={RelativeSource Self}}"  
            FontSize="{Binding FontSize,RelativeSource={RelativeSource Self}}"  
            FontStretch="{Binding FontStretch,RelativeSource={RelativeSource Self}}"  
            FontStyle="{Binding FontStyle,RelativeSource={RelativeSource Self}}"  
            FontWeight="{Binding FontWeight,RelativeSource={RelativeSource Self}}"  
            Foreground="{Binding Foreground,RelativeSource={RelativeSource Self}}"  
            IsChecked="{Binding IsSelected,  
                                Mode=TwoWay}" />  
                <TextBlock Margin="0,5,0,5" VerticalAlignment="Center" Foreground="Black" Text="{Binding DisplayText, Mode=TwoWay}"/>  
            </StackPanel>  
        </DataTemplate>  


We have prepared a sample for your reference and it is available in the following link. 

 
Regards, 
Arulraj A  


Loader.
Up arrow icon