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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Grouping Control Summary

Thread ID:

Created:

Updated:

Platform:

Replies:

37155 Nov 16,2005 04:00 PM UTC Nov 16,2005 11:26 PM UTC WinForms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On November 16, 2005 04:00 PM UTC

How would you make the summary row match the group header?

Administrator [Syncfusion]
Replied On November 16, 2005 07:26 PM UTC

I am not sure I understand. By group header, do you mean the group caption row? If so, ar e you showing summarycells in this caption row,and what you want is the summary rows under the group have the same size columns as the caption summaries? Or, do you just want the coloring of the summary row to be the same as the coloring of the caption row? Or something else?

Administrator [Syncfusion]
Replied On November 16, 2005 08:06 PM UTC

Sorry I was a little vague. Basically I am setting the text of the group caption row using the following code and I just want the same text to show up in the summary row. This is from the QueryCellStyleInfo event where the the tablecelltype is GroupCaptionCell GridCaptionRow gcr = e.TableCellIdentity.DisplayElement as GridCaptionRow; GridCaptionSection gcs = gcr.ParentSection as GridCaptionSection; Record rFirst = gcs.ParentGroup.GetFirstRecord(); int nFirst = e.TableCellIdentity.Table.FilteredRecords.IndexOf(rFirst) + 1; int nLast = nFirst + gcs.ParentGroup.GetChildCount() - 1; e.Style.Text = string.Format("{0}, Rows: {1}-{2}", rFirst.GetValue("group_name"), nFirst, nLast);

Administrator [Syncfusion]
Replied On November 16, 2005 11:26 PM UTC

You can try code like:
if(e.TableCellIdentity.TableCellType == GridTableCellType.SummaryEmptyCell 
	&& e.TableCellIdentity.ColIndex == e.TableCellIdentity.DisplayElement.GroupLevel + 1)
{
	GridSummaryRow gcr = e.TableCellIdentity.DisplayElement as GridSummaryRow;
	GridSummarySection gcs = gcr.ParentSection as GridSummarySection;
	Record rFirst = gcs.ParentGroup.GetFirstRecord();
	int nFirst = e.TableCellIdentity.Table.FilteredRecords.IndexOf(rFirst) + 1;
	int nLast = nFirst + gcs.ParentGroup.GetChildCount() - 1;
	e.Style.Text = string.Format("{0}, Rows: {1}-{2}", rFirst.GetValue("Col1"), nFirst, nLast);
}
Here is a little sample. http://www.syncfusion.com/Support/user/uploads/GGC_CustomEngine_515ff464.zip

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.

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

;