Articles in this section

How to right justify summary column in WinForms DataGrid?

By default, WinForms DataGrid (SfDataGrid) shows the GridTableSummaryRow in Left Alignment. You can change TableSummaryRow alignment by customization the HorizontalAligment property of 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;

Note:

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 DataGrid.



Right justify of Table ,Group and Caption summary in SfDataGrid


View sample in GitHub 


Conclusion

I hope you enjoyed learning about how to right justify the summary column in DataGrid.

You can refer to our WinForms DataGrid feature tour page to know about its other groundbreaking feature representations and WinForms DataGrid 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 forumsDirect-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)
Access denied
Access denied