How to Change Background of FilterPopup Ok/Cancel Button


Hiii,

I am using SfdataGrid in which i am using Filtering , I want to change Filter popup Style and Ok /Cancel Button background in it.

i have attached an image for an reference.

Thanks in advance
Harshul Jain

Attachment: Screenshot_(30)_60fc6084.zip

1 Reply

GT Gnanasownthari Thirugnanam Syncfusion Team November 28, 2017 10:59 AM UTC

Hi Harshul, 

You can change the Background color of Ok and Cancel button in FilterPopup by customize the control template of GridFilterControl like below code example. 

XAML 
<Button x:Name="PART_OkButton" 
                                                    Width="100" 
                                                    Margin="5,0,0,0" 
                                                    HorizontalAlignment="Stretch" 
                                                    Background="Green" 
                                                    BorderBrush="{StaticResource FilterButtonNormalBorder}" 
                                                    Content="{Binding Source={x:Static Member=syncfusion:GridResourceWrapper.OK}}" 
                                                    Foreground="{TemplateBinding Foreground}" 
                                                    FontFamily="{TemplateBinding FontFamily}" 
                                                    FontSize="{TemplateBinding FontSize}" 
                                                    FontStretch="{TemplateBinding FontWeight}" 
                                                    FontStyle="{TemplateBinding FontStyle}" 
                                                    FontWeight="{TemplateBinding FontWeight}" 
                                                    IsEnabled="False" 
                                                    Visibility="{Binding ImmediateUpdateColumnFilter, 
                                                                            RelativeSource={RelativeSource TemplatedParent}, 
                                                                            Converter={StaticResource ResourceKey=boolToVisiblityConverter}, 
                                                                            ConverterParameter=InverseVisiblity}" /> 
                                                    <Button x:Name="PART_CancelButton" 
                                                    Width="100" 
                                                    Margin="5,0,0,0" 
                                                    HorizontalAlignment="Stretch" 
                                                    Background="Red" 
                                                    BorderBrush="{StaticResource FilterButtonNormalBorder}" 
                                                    FontFamily="{TemplateBinding FontFamily}" 
                                                    FontSize="{TemplateBinding FontSize}" 
                                                    FontStretch="{TemplateBinding FontWeight}" 
                                                    FontStyle="{TemplateBinding FontStyle}" 
                                                    FontWeight="{TemplateBinding FontWeight}" 
                                                    Content="{Binding ImmediateUpdateColumnFilter, 
                                                                        RelativeSource={RelativeSource TemplatedParent}, 
                                                                        Converter={StaticResource resourceNameConverter}}" 
                                                    Foreground="{TemplateBinding Foreground}" /> 

We have prepared the sample based on your requirement, you can download it from below mentioned location. 


Please let us know if you need further assistance on this, we will happy to assist you. 

Regards, 
Gnanasownthari T. 


Loader.
Up arrow icon