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.

Accessing raw summary value.

Thread ID:

Created:

Updated:

Platform:

Replies:

88360 Jul 20,2009 04:50 PM Sep 1,2009 06:11 AM ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
Vasili Sviridov
Asked On July 20, 2009 04:50 PM

By trial and error I'm getting the raw summary values for the grouped columns, but I cannot access the Grand Total summary this way.

in QueryCellStyleInfo

ITreeTableSummary summary = e.TableCellIdentity.DisplayElement.ParentGroup.GetSummary(e.TableCellIdentity.SummaryColumn.GetSummaryIndex())

What's the best way to access raw summary data for a group and the total summary for the entire table. (Multiple grouping are possible, hence multiple summary levels)

Thanks.

Jisha Joy [Syncfusion]
Replied On September 1, 2009 06:11 AM

Hi Vasili,

Thank you for your interest in Syncfusion products.

You can try the following code snippet to retrieve all the summary values in the grid. It loops through the Table.NestedElements collection to get the GridSummaryRows and further it loops through SummaryRowDescriptor.SummaryColumns collection of each summary row to get the summary.

foreach (Element el in gridGroupingControl1.Table.NestedElements)
{
GridSummaryRow sr = el as GridSummaryRow;
if (sr != null)
{
foreach (GridSummaryColumnDescriptor scd in sr.SummaryRowDescriptor.SummaryColumns)
{
string result = GridEngine.GetSummaryText(sr.ParentGroup, scd);
Console.WriteLine("GroupLevel = {0}, SummaryColumns_Name = {1}, Value = {2}", sr.GroupLevel, scd.Name, result);
}
}
}

If you want to retrieve only the visible summary values in the grid you can loop through NestedDisplayElements collection instead of NestedElements.

Please try this and let me know if it helps you.

Regards,
Jisha

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.

;