简体   繁体   中英

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?

尝试像这样从布尔值中删除引号:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM