Articles in this section
Category / Section

How to show vertical border to the column wise summary rows in WPF DataGrid?

2 mins read

The vertical borders is not shows for each cell in summary rows when ShowSummartInRow is disabled in WPF DataGrid (SfDataGrid).

The summary rows will be displayed as shown in the following screenshot.

Display the summary row in WPF DataGrid

 

To show the vertical borders for each cell in summary row, write style for BorderThickness of  GridTableSummaryCell for GridTableSummaryRowGridCaptionSummaryCell for CaptionSummaryRow, and GridGroupSummaryCell for GroupSummaryRow.

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

<Style TargetType="syncfusion:GridTableSummaryCell">
     <Setter Property="BorderThickness" Value="0,0,1,0"/>
</Style>
<Style TargetType="syncfusion:GridCaptionSummaryCell">
     <Setter Property="BorderThickness" Value="0,0,1,1"/>
</Style>
<Style TargetType="syncfusion:GridGroupSummaryCell">
     <Setter Property="BorderThickness" Value="0,0,1,1"/>
</Style>

 

When the vertical border is applied, the summary rows will be appeared as shown in the following screenshot.

 

Summary rows applied to respective column in WPF DataGrid

 

View WPF DataGrid Summary Demo in GitHub


Conclusion

I hope you enjoyed learning about how to show border to column wise summaries in WPF DataGrid.

You can refer to our WPF DataGrid feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our WPF DataGrid example to understand how to create and manipulate data.

For current customers, you can check out our WPF controls from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!


Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied