JJ
Jisha Joy
Syncfusion Team
September 1, 2009 10:11 AM UTC
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