New to Telerik UI for WPF? Download free 30-day trial

Display CheckBox in Merged Cell for Column Bound to Boolean Property


Product RadGridView for WPF


How to show a CheckBox in merged cells inside a column bound to a boolean property (By default, True/False is shown).


Create a MergedCellsStyleSelector and return a custom style targeting GridViewMergedCell with its ContentTemplate containing a CheckBox. You can return this style only when the Value of the MergedCellInfo is of type bool.

        <DataTemplate x:Key="CheckBoxContentTemplate"> 
            <CheckBox IsChecked="{Binding .}" IsHitTestVisible="False"/> 
        <Style x:Key="CheckBoxMergedCellStyle" TargetType="telerik:GridViewMergedCell" BasedOn="{StaticResource GridViewMergedCellStyle}"> 
            <Setter Property="ContentTemplate" Value="{StaticResource CheckBoxContentTemplate}" /> 
        <local:MergedCellsStyleSelector x:Key="MergedCellStyleSelector" CheckBoxStyle="{StaticResource CheckBoxMergedCellStyle}"/> 
    <telerik:RadGridView x:Name="radGridView" 
                         MergedCellsStyleSelector="{StaticResource MergedCellStyleSelector}"> 

public class MergedCellsStyleSelector : StyleSelector 
    public Style CheckBoxStyle { get; set; } 
    public override Style SelectStyle(object item, DependencyObject container) 
        var cellInfo = item as MergedCellInfo; 
        if(cellInfo.Value.GetType() == typeof(bool)) 
            return CheckBoxStyle; 
        return base.SelectStyle(item, container); 
In this article