excel feature and mvvm

10 posts, 2 answers
  1. David Ocasio
    David Ocasio avatar
    147 posts
    Member since:
    Nov 2009

    Posted 04 Dec 2014 Link to this post

    I am trying to use the excel export feature with a grid but the toolbar icon is not the one in the demos.
    And it is not exporting (see snapshot).

    Is there something obvious I am doing  wrong.

    <script id="NodeViewTemplate" type="x-kendo-template">
         <div data-role="grid" id="grid1"
              data-scrollable="true"
              data-sortable="true"
              data-groupable="false"
              data-filterable="true"
              data-reorderable="true"
              data-resizable="true"
              data-row-template="NodeRowTemplate"
              data-alt-row-template="NodeAltRowTemplate"
              data-toolbar="['excel']"
              data-excel="fileName: 'Nodes.xlsx',
                          filterable: true"
             data-columns="[
             { field: 'statusimage' , width: 175 , title: 'Status'  },
             { field: 'idradio', width:100  , title: 'Device' },
             { field: 'peakCurrent',width:100  , title: 'Peak' },
             { field: 'avgCurrent',width:100  , title: 'Average' },
             { field: 'dateupdated', width:200 , title: 'Last Updated' },
             { field: 'nextupdate', width:200 , title: 'Next Update' },
             { Command: ['edit'] , width:150 , title: ''},
             ]"
             data-bind="source: Nodes, visible: isVisible">
         </div>
     </script>
  2. Answer
    BobT732
    BobT732 avatar
    4 posts
    Member since:
    Sep 2006

    Posted 05 Dec 2014 in reply to David Ocasio Link to this post

    Try adding this to the page header
        <script src="http://cdnjs.cloudflare.com/ajax/libs/jszip/2.4.0/jszip.min.js"></script>
  3. Kendo UI is VS 2017 Ready
  4. Answer
    Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 08 Dec 2014 Link to this post

    Hello David,

    The following example seems to work, maybe I missed something?

    http://dojo.telerik.com/awEvo

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  5. David Ocasio
    David Ocasio avatar
    147 posts
    Member since:
    Nov 2009

    Posted 08 Dec 2014 in reply to Kiril Nikolov Link to this post

    Thank you gentleman,

    The problem was indeed that I did not have the jszip file linked in the header.
    The Icon did not show because of caching on the browser.

    again thanks
    dco
  6. Haider
    Haider avatar
    3 posts
    Member since:
    Mar 2012

    Posted 14 Jun Link to this post

    can i have the same behavior via onclick event ? I need to add one more button at the top of the page that the user can click to export the grid result for excel.. how to do that?

     

  7. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 15 Jun Link to this post

    Hello,

    You can export the dataSource manually using the following approach:

    http://docs.telerik.com/kendo-ui/framework/excel/extract-datasoruce

    In case you have any further questions, please open a separate support request and we will be happy to help.

    Regards,
    Kiril Nikolov
    Telerik
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  8. Haider
    Haider avatar
    3 posts
    Member since:
    Mar 2012

    Posted 16 Jun in reply to Kiril Nikolov Link to this post

    Thank You Kiril, This is working fine for me...

  9. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 17 Jun Link to this post

    Hello,

    Excellent!

    In case you have any further questions do not hesitate to contact us.

    Regards,
    Kiril Nikolov
    Telerik
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  10. Haider
    Haider avatar
    3 posts
    Member since:
    Mar 2012

    Posted 30 Jun in reply to Kiril Nikolov Link to this post

    Hi there..

    Exporting the dataSource using the approach mentioned above will only export the first page int the grid, how to use "allPages" option within the same scenario?

    Thanks 

  11. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 01 Jul Link to this post

    Hello,

    I suppose you have serverPaging enabled? In that case the data is not present on the client, so you need to fetch all the data on the client before exporting it.

    Regards,
    Kiril Nikolov
    Telerik
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
Back to Top
Kendo UI is VS 2017 Ready