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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

AutoSize Group Header

Thread ID:





55175 Jan 24,2007 05:59 PM UTC Jan 29,2007 10:16 AM UTC WinForms 1
Tags: Grouping
Hu Anderson
Asked On January 24, 2007 05:59 PM UTC

I thought it would be something like:
this.ggcPandL.ChildGroupOptions.Autosize = true;

ie Autosize the cell with the CaptionText.

Hu Anderson

Administrator [Syncfusion]
Replied On January 29, 2007 10:16 AM UTC

Hi Hu,

Thank you for being patience.

This can be achieved by handling the QueryCoveredRange event. In the event, the caption text cell is made to cover some cells to make the text completely visible. The following is the code snippet.
GridTable thisTable = this.gridGroupingControl1.Table;
if (e.RowIndex < thisTable.DisplayElements.Count)
Element el = thisTable.DisplayElements[e.RowIndex];
switch (el.Kind)
case DisplayElementKind.Caption:
// Cover some cells of the caption bar (specified with captionCover)
IGridGroupOptionsSource gs = el.ParentGroup as IGridGroupOptionsSource;
if (gs != null && gs.GroupOptions.ShowCaptionSummaryCells)
int startCol = el.GroupLevel + 1;
if (!gs.GroupOptions.ShowCaptionPlusMinus)
if (e.ColIndex >= startCol && e.ColIndex <= startCol + this.captionCoverCols)
e.Range = GridRangeInfo.Cells(e.RowIndex, startCol, e.RowIndex, startCol + this.captionCoverCols);
e.Handled = true;

Please refer to the our shipped browser sample ‘SortBySummaryInCaption‘ [ \\windows\Grid.Grouping.Windows\Samples\Summaries\SortBySummaryInCaption ]

Kindly let us know if you need any further assistance.
Have a nice day.

Best regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon