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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

accessing summary row values from another column

Thread ID:





49291 Sep 15,2006 03:32 AM UTC Sep 21,2006 10:26 PM UTC WinForms 3
Tags: Grouping
Eric Weber
Asked On September 15, 2006 03:32 AM UTC


In the QueryCellStyleInfo event for a particular cell in a summary row (not sure if its called a summary row, I''m talking about the row that gets created when you drag a column heading into the groupDropArea), how do I access a data value in another cell in that summary row.

So if we have 2 columns (X and Y), and I''m in X''s QueryCellStyleInfo event for the summary row cell, how do I access the data value in Y''s summary row cell?

Thanks for all the help over the past few months!


Administrator [Syncfusion]
Replied On September 15, 2006 06:14 AM UTC

Hi Eric,

You can use the GetSummaries method to get the summary value at the specified index. Below is a code snippet.

switch (e.TableCellIdentity.TableCellType)
case GridTableCellType.SummaryFieldCell:
GridTable table = e.TableCellIdentity.Table;
GridSummaryRow row = e.TableCellIdentity.DisplayElement as GridSummaryRow;
GridSummaryRowDescriptor summaryRowDescriptor = row.SummaryRowDescriptor;
GridSummaryColumnDescriptor sumCol1 = summaryRowDescriptor.SummaryColumns["ColumnName"]; // name of summary column here ...
if (sumCol1 != null )
SummaryDescriptor sd1 = sumCol1.SummaryDescriptor;
if (sd1 != null)
int indexOfSd1 = table.TableDescriptor.Summaries.IndexOf(sd1);
CountSummary summary1 = (CountSummary) row.ParentGroup.GetSummaries(table)[indexOfSd1];
Console.WriteLine( "Summary value :" + summary1.Count + ":::" );

Thanks for using Syncfusion Products.

Best Regards,

Eric Weber
Replied On September 21, 2006 09:59 PM UTC

I have a GroupCaptionSummaryCell, therefore your line of code...

GridSummaryRow row = e.TableCellIdentity.DisplayElement as GridSummaryRow;

threw an error.



Eric Weber
Replied On September 21, 2006 10:26 PM UTC


this worked...




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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon