8 Answers, 1 is accepted
0
Hello,
You can use the approach covered in this code library article.
Kind Regards,
Petur Subev
the Telerik team
You can use the approach covered in this code library article.
Kind Regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Julien
Top achievements
Rank 1
answered on 14 Aug 2012, 06:19 AM
I'm well aware of this code, I already checked it, but I need group to be rendered in the excel file, like it does in asp.net ajax.
0
Hi Julien,
Basically you can add the group descriptor the same way the other descriptors are added. However on the server side when you have the group descriptor in your request object and you call ToDataSourceResult you will have a hierarchy of AggregateFunctionsGroup. You need to iterate through them recursively and write their items to the sheet in a formatted way (so they look like hierarchy).
Kind regards,
Petur Subev
the Telerik team
Basically you can add the group descriptor the same way the other descriptors are added. However on the server side when you have the group descriptor in your request object and you call ToDataSourceResult you will have a hierarchy of AggregateFunctionsGroup. You need to iterate through them recursively and write their items to the sheet in a formatted way (so they look like hierarchy).
Kind regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Julien
Top achievements
Rank 1
answered on 16 Aug 2012, 02:28 PM
So we have also to interpret the group by(check if they are a lot of them), change the column displayed, ....
Makes a lot of jobs compared to the old tools... Not a big improvement here, it's what I was afraid of.
Do yo have an example of this?
Makes a lot of jobs compared to the old tools... Not a big improvement here, it's what I was afraid of.
Do yo have an example of this?
0
Hello Julien,
The Kendo Wrappers for MVC does not support such Export To Excel feature out-of-the-box. The code library project is just for demonstration purposes and it could be used as a base point which users could extend with more complex logic.
I am afraid that we do not have example that shows how to handle the grouping.
Kind Regards,
Petur Subev
the Telerik team
The Kendo Wrappers for MVC does not support such Export To Excel feature out-of-the-box. The code library project is just for demonstration purposes and it could be used as a base point which users could extend with more complex logic.
I am afraid that we do not have example that shows how to handle the grouping.
Kind Regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Nikolay
Top achievements
Rank 1
answered on 11 Oct 2012, 10:16 AM
Hi, guys,
I've made an abstracted class which you can inherit in order to export to excel every data type (using reflection).
The class is a modification of this code: http://www.kendoui.com/code-library/mvc/grid/export-grid-to-excel.aspx
Here is the code: http://pastebin.com/29upR781
To use it you should override GetData() (which returns IEnumerable of your data)
Greetings,
Nikolay Kostov
I've made an abstracted class which you can inherit in order to export to excel every data type (using reflection).
The class is a modification of this code: http://www.kendoui.com/code-library/mvc/grid/export-grid-to-excel.aspx
Here is the code: http://pastebin.com/29upR781
To use it you should override GetData() (which returns IEnumerable of your data)
Greetings,
Nikolay Kostov
0
Vasilis
Top achievements
Rank 1
answered on 27 Jan 2014, 12:05 PM
What a great idea. Would you be kind enough to share your view page too or any js you have used in conjunction to the controller? I am trying to achieve the same as you but I am slightly stuck...
Many thanks
Vasilis
Many thanks
Vasilis
0
Paul
Top achievements
Rank 1
answered on 19 Jun 2014, 05:56 PM
Does anyone have a small sample app that uses Nikolay's (or any one elses') way to Export to Excel from a Telerik MVC Grid?