Grid Grouping Control Summary
3 Replies
AD
Administrator
Syncfusion Team
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?
AD
Administrator
Syncfusion Team
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);
AD
Administrator
Syncfusion Team
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
SIGN IN To post a reply.
- 3 Replies
- 1 Participant
-
AD Administrator
- Nov 16, 2005 04:00 PM UTC
- Nov 16, 2005 11:26 PM UTC