Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
24796 | Feb 10,2005 09:30 PM UTC | Feb 11,2005 09:09 PM UTC | WinForms | 1 |
![]() |
Tags: Grouping |
Group group = record.ParentGroup;
if (group is MyCustomGroup)
((MyCustomGroup) group).HighlightSummary = true;
else if (group is MyCustomChildTable)
((MyCustomChildTable) group).HighlightSummary = true;
In your MyCustomGroup and MyCustomChildTable classes you add a HighlightSummary flag.
A QueryCellInfo overide can look like this:
private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
Element el = e.TableCellIdentity.DisplayElement;
if (el is CaptionRow)
{
bool highlight = false;
Group group = el.ParentGroup;
if (group is MyCustomGroup)
highlight = ((MyCustomGroup) group).HighlightSummary;
else if (group is MyCustomChildTable)
highlight = ((MyCustomChildTable) group).HighlightSummary;
if (highlight && e.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionSummaryCell)
{
e.Style.BackColor = Color.Red; // your highlight color
}
}
}
Stefan 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.
This page will automatically be redirected to the sign-in page in 10 seconds.