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
close icon

How to remove checkbox in the left side and disable the BlankFilter in CheckboxFilterControl of SfDataGrid?

My final question is when popup is open, when I choose any checkbox except selectall and save it using okay button. After that when I open this popup again, I am seeing that one checkbox or checkbox icon I don't know what is that inside of this popup but in the left side. It is not clickeable. I am uploading an example image. I want to remove this thing from my popup


1 Reply 1 reply marked as answer

VS Vijayarasan Sivanandham Syncfusion Team November 11, 2022 03:36 PM

Your requirement to remove the checkbox in the left side by removing the PART_FilteredFromCheck1 border in CheckboxFilterControl like below mentioned code snippet,

<Style TargetType="{x:Type syncfusion:CheckboxFilterControl}">     

....………………..

………………….

………………….

 

              <ControlTemplate TargetType="{x:Type syncfusion:CheckboxFilterControl}">

                  <Grid Height="{TemplateBinding Height}">

                      <Grid.ColumnDefinitions>

                          <ColumnDefinition Width="30" />

                          <ColumnDefinition Width="*" />

                      </Grid.ColumnDefinitions>

                      <!--Here comment the border to remove the checkbox from the left side-->

                      <!--<Border Grid.Column="0"

                          Width="19"

                          Height="19"

                          Margin="4,39,4,4"

                          VerticalAlignment="Top"

                          BorderBrush="#FFB2B2B2"

                          BorderThickness="1,1,1,1"

                          Visibility="{Binding FilteredFrom,

                                               RelativeSource={RelativeSource FindAncestor,

                                                                              AncestorType={x:Type syncfusion:GridFilterControl}},

                                               Converter={StaticResource filteredFromCheckVisibilityConverter}}">

                          <Path x:Name="PART_FilteredFromCheck1"

                            Width="15"

                            Height="15"

                            Data="M 12.4227,0.00012207C 12.4867,0.126587 12.5333,0.274536 12.6787,0.321411C 9.49199,3.24792 6.704,6.57336 4.69865,10.6827C 4.04399,11.08 3.47066,11.5573 2.83199,11.9706C 2.09467,10.2198 1.692,8.13196 3.8147e-006,7.33606C 0.500004,6.79871 1.31733,6.05994 1.93067,6.2428C 2.85999,6.51868 3.14,7.9054 3.60399,8.81604C 5.80133,5.5387 8.53734,2.19202 12.4227,0.00012207 Z "

                            Fill="Gray"

                            Stretch="Uniform"

                            Visibility="{Binding FilteredFrom,

                                                 RelativeSource={RelativeSource FindAncestor,

                                                                                AncestorType={x:Type syncfusion:GridFilterControl}},

                                                 Converter={StaticResource filteredFromCheckVisibilityConverter}}">

                              <Path.RenderTransform>

                                  <TransformGroup>

                                      <TransformGroup.Children>

                                          <RotateTransform Angle="0" />

                                          <ScaleTransform ScaleX="1" ScaleY="1" />

                                      </TransformGroup.Children>

                                  </TransformGroup>

                              </Path.RenderTransform>

                          </Path>

                      </Border>-->

 

....………………..

………………….

………………….

  </Style>


AllowBlankFilters must be set to false if you do not want the blanks filter to appear in the filter items list.

UG Link: https://help.syncfusion.com/wpf/datagrid/filtering#filtering-null-values

Find the sample in the attachment.


If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.


Attachment: Sample_7e266c88.zip

Marked as answer
Loader.
Live Chat Icon For mobile
Up arrow icon