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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to remove the gridline of WPF DataGrid (SfDataGrid) with grouping?

Platform: WPF |
Control: SfDataGrid

WPF DataGrid (SfDataGrid) having grid lines for each row and column. But we can remove the grid lines for default row by write style for BorderThickness of GridCell. And remove the grid lines for caption row by write style for BorderThickness of GridCaptionSummaryCell and GridIndentCell.


Refer to the following code for writing style for summary cells to show the vertical border.

<Style TargetType="syncfusion:GridCell">
    <Setter Property="BorderThickness" Value="0"/>
<Style TargetType="syncfusion:GridIndentCell">
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
            <ControlTemplate TargetType="{x:Type syncfusion:GridIndentCell}">
<Style TargetType="syncfusion:GridCaptionSummaryCell">
    <Setter Property="Template">
            <ControlTemplate TargetType="{x:Type syncfusion:GridCaptionSummaryCell}">
                <Border x:Name="PART_GridCaptionSummaryCellBorder"
                    <ContentPresenter Margin="{TemplateBinding Padding}"
                                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                  SnapsToDevicePixels="True" />



View sample in GitHub

Reference links:




2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile