Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1945
Checkbox in Recordselector
posted

Hi

I'm trying to implement a "select all" functionality with checkboxes on the Header and record selector based on the example in the wpf sample browser. All seems well except the style for record selector removes the filter icon which removes all the filters with one click. How should i fix this?

Here's the style i'm using:

   

<Style TargetType="{x:Type igDP:RecordSelector}" BasedOn="{x:Null}">

<Setter Property="Template">

<Setter.Value>

<ControlTemplate TargetType="{x:Type igDP:RecordSelector}">

 <CheckBox HorizontalAlignment="Center" VerticalAlignment="Center" IsChecked="{Binding Path=DataItem.IsChecked, Mode=TwoWay}" />

</ControlTemplate>

 </Setter.Value>

 </Setter>

  </Style>

  • 35319
    posted

    Hello,

     

    I am just checking if you require any further assistance on the matter.

  • 35319
    posted

    Hello,

     

    I have been looking into your post and I am not sure how exactly the checkbox on the filter record removes the filter icon. It would be great if you could attach a descriptive screenshot.

     

    I was wondering if the checkbox is necessary for the filter record. If it is not, you can hide it like :

     

                <Style TargetType="{x:Type igDP:RecordSelector}" BasedOn="{x:Null}">

                    <Setter Property="Template">

                        <Setter.Value>

                            <ControlTemplate TargetType="{x:Type igDP:RecordSelector}">

                                <CheckBox HorizontalAlignment="Center" VerticalAlignment="Center"  />

                            </ControlTemplate>

                        </Setter.Value>

                    </Setter>

                    <Style.Triggers>

                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsFilterRecord}" Value="True">

                            <Setter Property="Visibility" Value="Hidden" />

                        </DataTrigger>

                    </Style.Triggers>

                </Style>

     

    Looking forward to hearing from you.