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.
Up arrow icon