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

Add 'Sum' in Export to Excel and Export Without Filter

1 Answer 191 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mahdi
Top achievements
Rank 1
Mahdi asked on 02 Jan 2016, 08:13 AM

Hello.

I have gird and I add "Export to excel" to it.it Works fine.

but I want Add Summation of some Columns of it after the last row in Excel file which is not in Grid.

And second Question , Users can filter my grid and it Works fine But I want when he/she Click on "Export to Excel" button, it Exports All of Data to excel Not just Filtered. Is it Possible?

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 06 Jan 2016, 04:01 PM
Hi Mahdi,

In case you are using a Biff or Xlsx export format then you can hook OnInfrastrucureExporting event handler and add the summation values at the end of the spreadsheet. More information about modifying the spreadsheet could be found in the following help article.
Regards your second question a possible solution is to disable the filtering by setting AllowFilteringByColumn to false when you export the grid. In case you are using the built-in buttons you can do that on ItemCommand event handler when export to excel command is fired.

Regards,
Kostadin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Mahdi
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or