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
1405
Template RecordSelector header
posted

Hy.

I have a question about the RecordSelector's header for the XamDataGrid.

I have a XamDataGrid for which I have changed the template for the RecordSelector to contain a checkbox for selecting the records. This checkbox it's bounded to a property of the objects displayed inside the grid. Everything work's fine. But I would like to change the header of the RecordSelector to contain also a checkbox, with the select all functionality. I have no idea how to reference the header of the RecordSelector. Is there a way to do this?

Here is my template for the RecordSelector:

<Style x:Key="CheckBoxSelector" TargetType="{x:Type dataPresenter:RecordSelector}">

<Setter Property="Template">

<Setter.Value>

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

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

</ControlTemplate>

</Setter.Value>

</Setter>

</Style>

Thanks very much

Nico

Parents
No Data
Reply
  • 6867
    posted

    Nico Oprescu said:
    But I would like to change the header of the RecordSelector to contain also a checkbox, with the select all functionality.

     

    Hi Nico,

    I don't understand what this means.  Please clarify what it means to have "select all functionality" exposed in the header of a RecordSelector.  What is the "all" that is being selected?  All of the child records?  All of the checkboxes in the record? What is the problem that you're facing when trying to implement this?

    Thanks,

    Josh

Children