Export to CSV Error with serverGrouping:true on DataSource definition

2 posts, 0 answers
  1. Luiz
    Luiz avatar
    5 posts
    Member since:
    May 2015

    Posted 21 Apr 2016 Link to this post

    Hi,

    My DataSource is presented below in coffescript. I omit some field for simplicty.

    version: Kendo UI v2016.1.412

    kendo.data.DataSource({
          serverAggregates: true
          serverGrouping: true
         ...
          schema:
            aggregates: 'aggregates'
            data: 'trips'
            total: 'total'
            model:
              id: 'period'
              fields:
                max_speed: {type:'number'}
                avg_speed: {type:'number'}
                trip_distance: {type:'number'}
            groups: (response) ->
             ...
          transport:
            read: (options) -> ...
        })

    When I export the CSV, I got the error "Uncaught TypeError: Cannot read property 'data' of undefined"

    Looking on the kendo Export source code, I found that when the serverGrouping is enabled, it expects an option object defined in the schema.transport parameter. This code is illustrated bellow.

     (function ($, kendo) {
            kendo.ExcelExporter = kendo.Class.extend({

             ...

     

     

     

     

     

  2. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2289 posts

    Posted 25 Apr 2016 Link to this post

    Hello Luiz,

     

    This thread is duplicate with this one here.

     

    Regards,
    Nikolay Rusev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top