Copy all data from Kendo UI Grid Export to Excel

I have a KendoUi grid with excel, an embedded PDF panel template, I populate kendoGrid with an ajax request for each page request. I make an ajax call to the server and bind the data to my grid.y, because my grid has 100,000 records (for better performance). So when I use all pages, this is a true property, it is not Export all records.

  var grid = $('#NewLeadsGrid').data("kendoGrid")

    var newdataSource = new kendo.data.DataSource({

        transport: {
            read: function (options) {
                $.ajax({

                    url: '/Reports/NewLeadsList',

                    contentType: "application/json; charset=utf-8",

                    dataType : "json",

                    data: JSON.stringify({
                        LifecycleStage: selfNewLeads.LifecycleStage(),
                        ShowTop: $('#NewLeadsGrid').data("kendoGrid").dataSource.pageSize(), 
                         Filters: selfNewLeads.Filters(),
                         CustomStartDate: selfNewLeads.CustomStartDate(),

                         CustomEndDate: selfNewLeads.CustomEndDate(),
                        PageNumber: $('#NewLeadsGrid').data("kendoGrid").dataSource.page(),
                        CustomPredicateScript: selfNewLeads.CustomPredicateScript()
                      }),
                    type: 'post',
                    success: function (result) {

                       options.success(result);

                    }


                });
            },


        },
        schema: {
            data: "Data",
            total: "Total"
        },

        serverPaging: true,

        pageSize: 10

    });

    grid.setDataSource(newdataSource);

    grid.dataSource.fetch();
+4
source share
1 answer

, , . allPages excel. " Excel", . .

<div id="grid"></div>
<script>
    $("#grid").kendoGrid({
        toolbar: ["excel"],
            excel: {
                allPages: true
        },
        dataSource: {
            transport: {
                read: {
                    url: "http://demos.telerik.com/kendo-ui/service/products",
                    dataType: "jsonp"
                }
            },
            pageSize: 10
        },
        pageable: true
    });
</script>
+2

All Articles