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.
Syncfusion Feedback

accessing summary row values from another column

Thread ID:

Created:

Updated:

Platform:

Replies:

49291 Sep 14,2006 11:32 PM Sep 21,2006 06:26 PM Windows Forms 3
loading
Tags: Grouping
Eric Weber
Asked On September 14, 2006 11:32 PM

Hello,

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!

Eric

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

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 + ":::" );
}
}
break;
}
}

Thanks for using Syncfusion Products.

Best Regards,
Haneef

Eric Weber
Replied On September 21, 2006 05:59 PM

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

GridSummaryRow row = e.TableCellIdentity.DisplayElement as GridSummaryRow;

threw an error.

Thanks,

eric

Eric Weber
Replied On September 21, 2006 06:26 PM

Nevermind......

this worked...

http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=24926

thanks!

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.

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

;