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

Export To Excel With Local Data

2 Answers 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Graham
Top achievements
Rank 1
Graham asked on 12 Oct 2015, 02:56 PM

I have a grid control which is bound to the model I have passed it in the view (local data):

 HireReport.cshml

 

    @model ReportingPortalWeb.Models.HireReportViewModel

     @(Html.Kendo().Grid(Model.StockReport)
          .Name("grid")
           .Columns(columns =>
                     {
                              columns.Bound(p => p.SohQty).Title("Quantity").Visible(Model.StockReport.Sum(t => t.SohQty) > 0);

                              ...

 

I want to add the export to excel function but this seems limited to remote data

     .ToolBar(tools => tools.Excel())

    ...

Is there no way to bind this to the local model data?

 

 ​

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 14 Oct 2015, 07:12 AM

Hello Graham,

The Excel export is not limited to remote data. What is the issue that you are experiencing?

Regards,
Dimiter Madjarov
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
0
Graham
Top achievements
Rank 1
answered on 20 Oct 2015, 07:56 AM

Thanks Dimiter.

 

I just thought there was a way to do it. I was using a model that the view had already loaded but I have changed this now so that it fetches the data remotely. I still pass the empty model to the view in order that the grid knows the columns.

 

Cheers.

Tags
Grid
Asked by
Graham
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Graham
Top achievements
Rank 1
Share this question
or