IamSalik
IamSalik

Reputation: 123

Kendo MVVM Grid export all pages in pdf

I found kendo grid exporting all pages javascript code

$("#grid").kendoGrid({
    toolbar: ["pdf"],
    pdf: {
        allPages: true,
        fileName: "Kendo UI Grid Export.pdf", //optional
        proxyURL: "http://demos.telerik.com/kendo-ui/service/export" //optional
    },
    .....

It exports all pages of grid

How to use this allPages setting in my MVVM grid like

<div data-role="grid"
                         data-editable="false"
                         data-columns="[
                                    ....
                                ]"
                         data-selectable="false"
                         data-bind="source: dataSource"
                         data-row-template="row-template"
                         data-alt-row-template="alt-row-template"
                         data-pageable="{ refresh: true, pageSizes: [50, 100] }"
                         data-scrollable="true"
                         data-toolbar="['pdf']"
                         data-pdf=[{'allPages':'true'}]
                         style="width: 100%; ">
                    </div>

It exports only visible page. I have set paging true in data source is that the problem?

Upvotes: 0

Views: 758

Answers (1)

Nick S
Nick S

Reputation: 57

Try removing the quotes from the boolean like this:

data-pdf = [ { 'allPages': true } ]

Upvotes: 1

Related Questions