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.
Unfortunately, activation email could not send to your email. Please try again.

AutoSize Group Header

Thread ID:

Created:

Updated:

Platform:

Replies:

55175 Jan 24,2007 12:59 PM Jan 29,2007 05:16 AM Windows Forms 1
loading
Tags: Grouping
Hu Anderson
Asked On January 24, 2007 12:59 PM

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

ie Autosize the cell with the CaptionText.

Thanks
Hu Anderson

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

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)
startCol--;
if (e.ColIndex >= startCol && e.ColIndex <= startCol + this.captionCoverCols)
{
e.Range = GridRangeInfo.Cells(e.RowIndex, startCol, e.RowIndex, startCol + this.captionCoverCols);
e.Handled = true;
}
}
break;
}
}
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>

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,
Madhan

CONFIRMATION

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.

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.

;