How to right justify summary column in WinForms DataGrid (SfDataGrid)?
By default, WinForms DataGrid shows the TableSummaryRow in Left Alignment. You can change TableSummaryRow alignment by customization the HorizontalAligment property of SfDataGrid.Style.TableSummaryRowStyle property. The TableSummaryRowStyle property contains all the settings that are needed for the table summary row appearance customization.
// justify the values to be right in the summary rows this.sfDataGrid.Style.TableSummaryRowStyle.HorizontalAlignment = HorizontalAlignment.Right; this.sfDataGrid.Style.GroupSummaryRowStyle.HorizontalAlignment = HorizontalAlignment.Right; this.sfDataGrid.Style.CaptionSummaryRowStyle.HorizontalAlignment = HorizontalAlignment.Right;
GroupSummaryRowStyle and CaptionSummaryRowStyle horizontal alignment are customized like the horizontal alignment customization of TableSummaryRowStyle
The following screenshot shows the right justify of Table, Group and Caption summary column in SfDataGrid,
View Sample in GitHub
Conclusion
I hope you enjoyed learning about how to right justify the summary column in WinForms DataGrid (SfDataGrid).
You can refer to our WinForms 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 WinForms DataGrid example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other 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!