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
close icon

Setting GroupCaptionCell column format and alignment.

How do you set a specific GroupCaptionCell/GroupCaptionSummaryCell or SummaryFieldCell/CustonSummary field format and text-alignment. The code below...
this.gridGroupingControl.Appearance.GroupCaptionSummaryCell.HorizontalAlignment = GridHorizontalAlignment.Center;
this.gridGroupingControl.Appearance.GroupCaptionCell.HorizontalAlignment = GridHorizontalAlignment.Left;

...does it for all cell, but what if I wanted to set a specific column in the group differently?

thx

1 Reply

AD Administrator Syncfusion Team September 21, 2006 04:49 AM UTC

Hi James,

Use GridColumnDescriptor.Appearance to change the alignment of the particular column. Below is a code snippet to change appearance of the column in a grid.

//For Main Table

this.grid.TableDescriptor.Columns["ColName"].Appearance.GroupCaptionSummaryCell.HorizontalAlignment = GridHorizontalAlignment.Center;
this.grid.TableDescriptor.Columns["ColName"].Appearance.GroupCaptionCell.HorizontalAlignment = GridHorizontalAlignment.Left;

//For any table....
GridTableDescriptor gd = this.grid.GetTableDescriptor("MyTable"); //Code

gd.Columns["ColName"].Appearance.GroupCaptionSummaryCell.HorizontalAlignment = GridHorizontalAlignment.Center;
gd.Columns["ColName"].Appearance.GroupCaptionCell.HorizontalAlignment = GridHorizontalAlignment.Left;

Thanks,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon