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. Image for the cookie policy date
close icon

Summary data in groups question.

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

5 Replies

AD Administrator Syncfusion Team December 20, 2005 07:21 PM UTC

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


AD Administrator Syncfusion Team December 21, 2005 12:35 PM UTC

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


AD Administrator Syncfusion Team December 21, 2005 05:28 PM UTC

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


CL Claudio February 22, 2006 01:41 PM UTC

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


AD Administrator Syncfusion Team February 22, 2006 04:12 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon