How to Access RadGridView Summary Column Value

2 posts, 0 answers
  1. Kashif
    Kashif avatar
    66 posts
    Member since:
    Jan 2019

    Posted 24 Aug 2019 Link to this post

    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. 

     

     

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3626 posts

    Posted 26 Aug 2019 Link to this post

    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.
Back to Top