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

Summary row title and backcolor problem

Thread ID:

Created:

Updated:

Platform:

Replies:

72726 Apr 2,2008 12:33 PM UTC Apr 3,2008 04:31 AM UTC WinForms 2
loading
Tags: GridControl
Gomati Mahabal
Asked On April 2, 2008 12:33 PM UTC

Hi,

I am facing a problem in GCC, assigning of caption i.e Title and backcolor to my summary rows.

I have created a summaryrowdescriptor object and set ChildGroupOptions and TopLevelGroupOptions showsummaries to true, which shows summary for each group and grand total of all groups.

Problem is i am not not able to set different backcolor for total and grandtotal row, also not able to set title as "Total" and "Grand Total" for those summary rows. It shows common color and title for all.

Any help would be higly appreciated.


Thanks,
Gomati


Administrator [Syncfusion]
Replied On April 2, 2008 11:14 PM UTC

Hi Gomati,

Issue 1
<<<<<<<<<
To set Back color of all summary row you need to use below code snippet

this.gridGroupingControl1.TableDescriptor.Appearance.AnySummaryCell.BackColor = Color.Red;

//To set Back color of particular GroupSummary Row
this.gridGroupingControl1.TableDescriptor.Columns["Name"].GroupByAppearance.AnySummaryCell.BackColor = Color.LightBlue;

Issue 2
<<<<<<<<<<<
To set different Summary Title for each Groupsummary Row, you need to handle " e.Style.Text" property in QueryCellStyleInfo event. Below are the code

Element el = e.TableCellIdentity.DisplayElement;
if (e.TableCellIdentity.DisplayElement != null && e.TableCellIdentity.TableCellType != GridTableCellType.SummaryFieldCell &&
e.TableCellIdentity.TableCellType == GridTableCellType.SummaryTitleCell && el.ParentGroup.Name == "Name")
{
e.Style.Text = "Total";
}


Please refer the sample for implementation and let me know if this helps.
http://websamples.syncfusion.com/samples/Grid.Windows/F72726/main.htm


Best regards,
Johnson







Gomati
Replied On April 3, 2008 04:31 AM UTC

Hi Jhonson,

Thanks a lot for reply. It really helped me in my task completion.

Thanks,
Gomati

>Hi Gomati,

Issue 1
<<<<<<<<<
To set Back color of all summary row you need to use below code snippet

this.gridGroupingControl1.TableDescriptor.Appearance.AnySummaryCell.BackColor = Color.Red;

//To set Back color of particular GroupSummary Row
this.gridGroupingControl1.TableDescriptor.Columns["Name"].GroupByAppearance.AnySummaryCell.BackColor = Color.LightBlue;

Issue 2
<<<<<<<<<<<
To set different Summary Title for each Groupsummary Row, you need to handle " e.Style.Text" property in QueryCellStyleInfo event. Below are the code

Element el = e.TableCellIdentity.DisplayElement;
if (e.TableCellIdentity.DisplayElement != null && e.TableCellIdentity.TableCellType != GridTableCellType.SummaryFieldCell &&
e.TableCellIdentity.TableCellType == GridTableCellType.SummaryTitleCell && el.ParentGroup.Name == "Name")
{
e.Style.Text = "Total";
}


Please refer the sample for implementation and let me know if this helps.
http://websamples.syncfusion.com/samples/Grid.Windows/F72726/main.htm


Best regards,
Johnson










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

;