Get values from summary row

Hi Hanneef, i need some help with summary rows, i need to get the values from one summary row, to be able to use them in another summary row, please refer to the example i attached....

to simplify ..:)

[URL=http://imageshack.us][IMG]http://img521.imageshack.us/img521/3182/sumrowdiffaa2.jpg[/IMG][/URL]

thanx!

GGCSummaryCellText.zip

3 Replies

RA Rajagopal Syncfusion Team June 7, 2007 11:21 PM UTC

Hi Mario,

Please try the code below to get the values from a summary row.

foreach (Element el in gridGroupingControl1.Table.DisplayElements)
{
if (el is GridSummaryRow)
{
GridSummaryRow sr = el as GridSummaryRow;
if (sr != null)
{
foreach (GridSummaryColumnDescriptor scd in sr.SummaryRowDescriptor.SummaryColumns)
{
Console.WriteLine("{0} = {1}", scd.Name, GridEngine.GetSummaryText(sr.ParentGroup, scd));
}
}
}
}

Let me know if this helps.
Regards,
Rajagopal


MM Mario Mojaš June 8, 2007 06:46 AM UTC



>Hi Mario,

Please try the code below to get the values from a summary row.

foreach (Element el in gridGroupingControl1.Table.DisplayElements)
{
if (el is GridSummaryRow)
{
GridSummaryRow sr = el as GridSummaryRow;
if (sr != null)
{
foreach (GridSummaryColumnDescriptor scd in sr.SummaryRowDescriptor.SummaryColumns)
{
Console.WriteLine("{0} = {1}", scd.Name, GridEngine.GetSummaryText(sr.ParentGroup, scd));
}
}
}
}

Let me know if this helps.
Regards,
Rajagopal


hmmm... i'm still lost :), could you please expand my example with the snippet, so i can actually understand and see how it works.. Thanx!


AD Administrator Syncfusion Team June 8, 2007 01:58 PM UTC

Here is your sample back using QueryCellStyleInfo to combine the 2 summaries values into a summary in a different row.


GGCSummaryCellText0.zip

Loader.
Up arrow icon