New to Telerik UI for WPFStart a free 30-day trial

Display CheckBox in Merged Cell for Column Bound to Boolean Property

Updated on Sep 15, 2025

Environment

ProductRadGridView for WPF

Description

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

Solution

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.

XAML
	<Grid>
        <Grid.Resources>
            <DataTemplate x:Key="CheckBoxContentTemplate">
                <CheckBox IsChecked="{Binding .}" IsHitTestVisible="False"/>
            </DataTemplate>
            
            <Style x:Key="CheckBoxMergedCellStyle" TargetType="telerik:GridViewMergedCell" BasedOn="{StaticResource GridViewMergedCellStyle}">
                <Setter Property="ContentTemplate" Value="{StaticResource CheckBoxContentTemplate}" />
            </Style>
            
            <local:MergedCellsStyleSelector x:Key="MergedCellStyleSelector" CheckBoxStyle="{StaticResource CheckBoxMergedCellStyle}"/>
        </Grid.Resources>
        <telerik:RadGridView x:Name="radGridView"
							 MergedCellsDirection="Vertical"  
							 GroupRenderMode="Flat"
                             EditTriggers="CellClick"
                             MergedCellsStyleSelector="{StaticResource MergedCellStyleSelector}">
        </telerik:RadGridView>
    </Grid>
C#
	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
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support