RadGrid Footer Total Dynamically

9 posts, 0 answers
  1. Nirmal
    Nirmal avatar
    17 posts
    Member since:
    Jun 2009

    Posted 28 Oct 2009 Link to this post

    Hi Telerik,

      I have a RadGrid and generated auto generate columns.
    My scenario is, I would like to make a total of all columns in footer.
    How can i calculate dynamically and assign into footer.
    Pls.. Its very urgent


    Regards,
    Nirmal 
  2. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 28 Oct 2009 Link to this post

    Hello Nirmal,

    In order to set the aggregate property for the AutoGeneratedColumns dynamically. Intercept the ColumnCreated event of the grid as explained in the bottom section of this documentation article and then set its Aggregate property.

    Sincerely yours,
    Pavlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Nirmal
    Nirmal avatar
    17 posts
    Member since:
    Jun 2009

    Posted 29 Oct 2009 Link to this post

    Hi Pavlina,
      I couldn't get any idea. Pls can u explain me how to set aggregate method through column_Created event and
    print it in the bottom of the every column.


    Nirmal
  4. Nirmal
    Nirmal avatar
    17 posts
    Member since:
    Jun 2009

    Posted 29 Oct 2009 Link to this post

    Hi ,
      I set the Aggregate in Column_Created event.
    lik
            if (e.Column is GridBoundColumn)
            {
                GridBoundColumn col = (GridBoundColumn)e.Column;
                if (col.UniqueName == "Month & Year")
                {
                    col.HeaderStyle.Width = Unit.Pixel(100);
                }
                else
                {
                    col.Aggregate = GridAggregateFunction.Sum;
                }
            } 
    But it shows the following error.
    Syntax error in aggregate argument: Expecting a single column argument with possible 'Child' qualifier.


    What can I do?
  5. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 02 Nov 2009 Link to this post

    Hi Nirmal,

    Having auto-generated columns in RadGrid and using aggregate functions is a specific scenario in which you need to set the UseAllDataFields property of the grid's MasterTableView to true. Please, try this suggestion and let us know of the result.

    Regards,
    Pavlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Nirmal
    Nirmal avatar
    17 posts
    Member since:
    Jun 2009

    Posted 03 Nov 2009 Link to this post

    Hi Pavlina,

        I set the UseAllFields column to true. But the same error is occuring.
    Can you have any other ways.
    Thanks,
    Nirmal
  7. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 06 Nov 2009 Link to this post

    Hi Nirmal,

    In the following help article are the steps you need to undertake to display totals in the grid columns footer:
    Totals in grid footers(Programmatic solution section)

    I hope this helps.

    Kind regards,
    Pavlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  8. Manpreet
    Manpreet avatar
    1 posts
    Member since:
    Nov 2017

    Posted 21 Aug 2018 in reply to Pavlina Link to this post

    Hi

    the link (Totals in grid footers(Programmatic solution section))

    is broken. I am having same problem. Can you please help?

  9. Attila Antal
    Admin
    Attila Antal avatar
    302 posts

    Posted 24 Aug 2018 Link to this post

    Hi Manpreet,

    The resource article has been moved into another folder and can be access under the following Link: Totals in Grid Footers  or by browsing to Telerik UI for ASP.NET AJAX Documentation > Controls > Grid > how-to > Common > totals-in-grid-footers)

    Kind regards,
    Attila Antal
    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