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.

Summary data in groups question.

Thread ID:

Created:

Updated:

Platform:

Replies:

38822 Dec 20,2005 12:56 AM Feb 22,2006 11:12 AM ASP.NET Web Forms (Classic) 5
loading
Tags: GridGroupingControl
Steven Carter
Asked On December 20, 2005 12:56 AM

Is there a way to show summary aggregate values (e.g. SUM, AVG) for a group, while the group is collapsed? The business objective here is to allow the user to see summary values while the grid is collapsed and then drill down to detail (i.e. expand groups) as necessary. - Steve

Administrator [Syncfusion]
Replied On December 20, 2005 02:21 PM

Steven, Yes, that''s certainly possible. Let me know where exactly you would like the summaries displayed? Will appending the summary information to the group caption work for you? Let me know what version of Studio you are using and the VS.Net version, we will try to preprae a sample. Regards, Praveen

Administrator [Syncfusion]
Replied On December 21, 2005 07:35 AM

Hi Steven , You can append the summary information to the group caption with the following code In Page_Init or Page_load and this will display the respective SummaryRow in the ChildGroupCaption. [C#] this.GridGroupingControl1.TableDescriptor.ChildGroupOptions.ShowCaptionSummaryCells=true; this.GridGroupingControl1.TableDescriptor.ChildGroupOptions.CaptionSummaryRow ="MainSummaryRow"; this.GridGroupingControl1.TableDescriptor.ChildGroupOptions.ShowSummaries=true; You can try this in existing portfolio sample where the default Sumamries will also be displayed in ChildGroupCaption, after grouping any of the columns . We will also try to prepare a sample, if this doesn''t solve your query. Best Regards , A.Sivakumar

Administrator [Syncfusion]
Replied On December 21, 2005 12:28 PM

Hi Steve, we are updating this forum with more info for clarity. Attached is a sample illustrating the feature of summary row in caption The sample''s Folder should be pointing to your Default local host followed by the cs folder Extract the zip file to Default localhost. if you are working with 3.301.0.0 version , without any changes the sample should work fine. else Change the register tag prefix accordingly to the version you are using now The datas used in the sample is already pointing to Syncfusion virtual directory , So if you have any of our Versions installed this will get the data from there . Best Regards, A.Sivakumar

Forum38822.zip

Claudio
Replied On February 22, 2006 08:41 AM

Hi, is it possible to sum more than one separated columns in a same GridGroupingControl ? Because TableDescriptor.ChildGroupOptions.CaptionSummaryRow just take one string. I would like to Sum one column and an another one separated but in the same GridGroupingControl. Thank you. >Hi Steve, > >we are updating this forum with more info for clarity. > >Attached is a sample illustrating the feature of summary row in caption > >The sample''s Folder should be pointing to your Default local host followed by the cs folder > >Extract the zip file to Default localhost. > >if you are working with 3.301.0.0 version , without any changes the sample should work fine. >else Change the register tag prefix accordingly to the version you are using now > >The datas used in the sample is already pointing to Syncfusion virtual directory , So if you have any of our Versions installed this will get the data from there . > > > >Best Regards, >A.Sivakumar

Forum38822.zip

Administrator [Syncfusion]
Replied On February 22, 2006 11:12 AM

Hi Claudio, I am not sure exactly what the need is. but you can certainly manipulate the value of summary records and then update them in the group caption. you can do the manipulation of the various summary column records inside the QuerycellStyleinfoEvent You can insert the below code in the Portfolio sample shipped with our Essential studio install. and try group by the value or volume column , you can see that each caption will have the sum of the value and changed value of the day. Eg.In QueryCellStyleInfo event: code snippet in[c#] case GridTableCellType.GroupCaptionCell: { //Here you can modify the codes and perform actions as per your requirements GridSummaryRowDescriptor sumRow1 = e.TableCellIdentity.Table.TableDescriptor.SummaryRows.GetSummaryRowDescriptor("MainSummaryRow"); GridSummaryColumnDescriptor sumTotalValue1 = sumRow1.SummaryColumns.GetSummaryColDescriptor("ValueTotal"); int indexOfTV = e.TableCellIdentity.Table.TableDescriptor.Summaries.IndexOf(sumTotalValue1.SummaryDescriptor); DoubleAggregateSummary totalValue1 = e.TableCellIdentity.DisplayElement.ParentGroup.GetSummaries(e.TableCellIdentity.Table)[indexOfTV] as DoubleAggregateSummary; ; GridSummaryColumnDescriptor sumDayValueChange = sumRow1.SummaryColumns.GetSummaryColDescriptor("DayTotalValueChange"); int indexOfPP1 = e.TableCellIdentity.Table.TableDescriptor.Summaries.IndexOf(sumDayValueChange.SummaryDescriptor); DoubleAggregateSummary daychangePrice = e.TableCellIdentity.DisplayElement.ParentGroup.GetSummaries(e.TableCellIdentity.Table)[indexOfPP1] as DoubleAggregateSummary; Double Total= totalValue1.Sum + daychangePrice.Sum ; //This will show the sum of the Value and also the changed value of the day in the group caption e.Style.Text = Total.ToString(); break; } Hope this will give you some idea. Best Regards, A.Sivakumar

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.

;