Articles in this section
Category / Section

How to align the summary cells in the WinForms GridGroupingControl?

1 min read

Summary cell alignment

By default, the horizontal alignment of the summary cells is left. However, you can align the summary cells by setting the HorizontalAlignment property to Right. You can refer to the following code example for using the HorizontalAlignment property.

C#

GridSummaryColumnDescriptor sumCol1 = new GridSummaryColumnDescriptor("sumCol1", SummaryType.DoubleAggregate, "Value2", "{Sum}");
GridSummaryRowDescriptor srd = new GridSummaryRowDescriptor("Sum", "Total", sumCol1);
srd.Appearance.AnyCell.HorizontalAlignment = GridHorizontalAlignment.Right;

 

VB

Dim sumCol1 As New GridSummaryColumnDescriptor("Sum", SummaryType.DoubleAggregate, " Value2", "{Sum:#}")
Dim srd As New GridSummaryRowDescriptor("Sum", "Total", sumCol1)
srd.Appearance.AnyCell.HorizontalAlignment = GridHorizontalAlignment.Right

In the following screenshot, summary cell is right aligned.

Summary cell in horizontal alignment

Samples:

C#: SummaryCellAlignment-C#.

VB: SummaryCellAlignment-VB.

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