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

RadGrid Footer Total Dynamically

8 Answers 780 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nirmal
Top achievements
Rank 1
Nirmal asked on 28 Oct 2009, 12:14 PM
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 

8 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 28 Oct 2009, 03:50 PM
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.
0
Nirmal
Top achievements
Rank 1
answered on 29 Oct 2009, 05:17 AM
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
0
Nirmal
Top achievements
Rank 1
answered on 29 Oct 2009, 09:16 AM
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?
0
Pavlina
Telerik team
answered on 02 Nov 2009, 03:20 PM
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.
0
Nirmal
Top achievements
Rank 1
answered on 04 Nov 2009, 04:35 AM
Hi Pavlina,

    I set the UseAllFields column to true. But the same error is occuring.
Can you have any other ways.
Thanks,
Nirmal
0
Pavlina
Telerik team
answered on 06 Nov 2009, 03:15 PM
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.
0
Manpreet
Top achievements
Rank 1
answered on 21 Aug 2018, 04:35 PM

Hi

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

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

0
Attila Antal
Telerik team
answered on 24 Aug 2018, 09:35 AM
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.
Tags
Grid
Asked by
Nirmal
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Nirmal
Top achievements
Rank 1
Manpreet
Top achievements
Rank 1
Attila Antal
Telerik team
Share this question
or