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

Customizing Extra Section added thru custom engine

I have add an extra section thru my custom engine ( this.Sections.Add(new ExtraSection(this));). I would like to customize the extra section using something similar to the like this for the GroupCaptionCell...

this.gridGroupingControl1.Appearance.GroupCaptionCell.CellType = "Static";

// set caption and header row height
this.gridGroupingControl1.TableOptions.CaptionRowHeight = this.gridGroupingControl1.TableOptions.RecordRowHeight;
this.gridGroupingControl1.TableOptions.ColumnHeaderRowHeight = this.gridGroupingControl1.TableOptions.RecordRowHeight;
this.gridGroupingControl1.Appearance.SummaryEmptyCell.HorizontalAlignment = GridHorizontalAlignment.Center;
this.gridGroupingControl1.Appearance.SummaryEmptyCell.Borders.All = new GridBorder(GridBorderStyle.Standard);

but I can't seem to find the type in VS intellisense.

1 Reply

AD Administrator Syncfusion Team December 4, 2006 05:54 AM UTC

Hi James,

You can handle the QueryCellStyleInfo event to change the Appearance of the ExtraSection cells in a grid. Here is a code snippet to show this.

private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
Element el = e.TableCellIdentity.DisplayElement;
if (el is ExtraSection)
{
e.Style.CellType = "Header";
e.Style.Text = "ExtraSectionCell";
e.Style.Font = new GridFontInfo(new Font(e.Style.GdipFont ,FontStyle.Bold));
}
}

Please refer to the attached sample for implementation.
GGCExtraSectionCaption.zip

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon