This is a migrated thread and some comments may be shown as answers.

How to Access RadGridView Summary Column Value

1 Answer 946 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kashif
Top achievements
Rank 1
Kashif asked on 24 Aug 2019, 07:11 PM

Dear Admins.

I'm Using radGridView, It have Some Summay Columns Added using the Code Below.

1.GridViewSummaryItem sumAmount = new GridViewSummaryItem
2.{
3.       Name = "Amount",
4.       FormatString = "{0:N2}",
5.       Aggregate = GridAggregateFunction.Sum
6.};
7.GridViewSummaryRowItem summaryRowItem = new GridViewSummaryRowItem(new GridViewSummaryItem[] { sumAmount,});
8.radGridView1.MasterTemplate.SummaryRowsBottom.Add(summaryRowItem);

 

How can i Access the Summary Item Values.

Do i have to iterate the GridView rows to Calculate the Sum or is there any easy way to access the Value. 

 

 

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 26 Aug 2019, 11:37 AM
Hello, Muhammad,  

The RadGridView.MasterView.SummaryRows collection stores the summary rows that you have in the grid. However, if you need to extract the value of the summary row, you can subscribe to the RadGridView.GroupSummaryEvaluate event and get the GroupSummaryEvaluationEventArgs.Value property.

I hope this information helps. 

 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Kashif
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or