Export To Excel With Local Data

3 posts, 1 answers
  1. Graham
    Graham avatar
    5 posts
    Member since:
    Jul 2010

    Posted 12 Oct 2015 Link to this post

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



        @model ReportingPortalWeb.Models.HireReportViewModel

               .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. Answer
    Dimiter Madjarov
    Dimiter Madjarov avatar
    2123 posts

    Posted 14 Oct 2015 Link to this post

    Hello Graham,

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

    Dimiter Madjarov
    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
  3. UI for ASP.NET AJAX banner
  4. Graham
    Graham avatar
    5 posts
    Member since:
    Jul 2010

    Posted 20 Oct 2015 in reply to Dimiter Madjarov Link to this post

    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.



Back to Top