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

Perform operations on columns using GridSummaryRowDescriptor

Thread ID:

Created:

Updated:

Platform:

Replies:

82274 Jun 8,2009 10:03 AM Jun 9,2009 07:46 AM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On June 8, 2009 10:03 AM

I'm summarizing a grid with 5 columns. For most columns, I simply take the sum of the values for that particular column. But there are some columns that need division operations for the summary. To illustrate:
Column 1- summary of column 1
Column 2 - summary of column 2
Column 3 - Summary of column 1/ summary of column 2
Column 4 - Summary of Column 4
Column 5 - ((Summary of Column 1 *4 ) + Summary of Column 2)/ 100

It's simple enough to format the sum of each column, but how do you format the summary row of column 3 and column 5? (Both Column 3 and 5 should come out in 2 decimal places e.g. .05)

I am using this syntax for column 1, 2 and 4:
Dim sd1 As GridSummaryRowDescriptor = New GridSummaryRowDescriptor(.Name, Syncfusion.Grouping.SummaryType.Int32Aggregate, .Name, "{Sum:#,##0}")

gsr.SummaryColumns.Add(sd1)

Lingaraj S [Syncfusion]
Replied On June 9, 2009 07:46 AM

Hi Karver,

Thank you for your interest in Syncfusion product.

If you want to calculate the summary row value depends on the another summary column value. It can be achieved through some workaround with QueryCellStyleInfo event. Please try using the TableCellIdentity.SummaryColumn and VisibleColumns property in QueryCellStyleInfo event to achieve this behavior. The Summary Column used to placed the calculated value into summary cells.

Refer the sample in below link:
http://files.syncfusion.com/support/samples/Grid.Windows/Forums/GGCSummary/main.htm

This sample demonstrate your requirements with GridGroupingControl summaries.

Let me know if you have any queries.

Regards,
Lingaraj S.

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

;