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

datagridcontrol with checkbox

Hi,

is there a sample using a Checkbox in the Header of a column.
This Checkbox should un/check all checkboxes in the rows, even over paging.

Cheers

 

Andreas Löwe

 


1 Reply

SM Saravanan M Syncfusion Team September 5, 2013 02:27 PM UTC

 

Hi Andreas,

We have analyzed your query, you can add checkbox in the column header by using GridDataCheckBoxVisibleColumn. You can refer the below code snippet.

Codesnippet[XAML]:

<syncfusion:GridDataCheckBoxVisibleColumn MappingName="Selected" AllowSort="False" HeaderText="False">

    <syncfusion:GridDataCheckBoxVisibleColumn.HeaderCellTemplate>

       <DataTemplate>

        <CheckBox  Name="checkbox" IsChecked="{Binding CellBoundValue}" IsThreeState="False" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black" Content="IsChecked">

            <i:Interaction.Behaviors>

            <local:ButtonClickBehavior/>

            </i:Interaction.Behaviors>

         </CheckBox>

        </DataTemplate>

     </syncfusion:GridDataCheckBoxVisibleColumn.HeaderCellTemplate>

                   

 <syncfusion:GridDataCheckBoxVisibleColumn.ColumnStyle>

 

 

We have prepared a sample based on this, Please find the attached sample.

Please let us know if you  have any queries,

Regards,

Saravanan.M

 



GridDataControl_checkboxselection_9142cb02.zip

Loader.
Live Chat Icon For mobile
Up arrow icon