Click here to Skip to main content
15,887,815 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have kendo grids and charts and it needs to be downloaded to PDF .Iam able to download to PDF sucessfully but i need to add some other data as well on PDF like dropdown down selected value and textbox selected value. how can i append ?

below code which i have attached with extract all charts to PDF

What I have tried:

$('#exportBtn').on('click', function () {
            var grid1 = $('#ServerLastLoginChart').data('kendoChart');
            var grid2 = $('#WSLastLoginChart').data('kendoChart');
            var grid3 = $('#WSOSChart').data('kendoChart');
            var grid4 = $('#ServerOSChart').data('kendoChart');

            var progress = $.Deferred();

            grid1._drawPDF(progress)
                .then(function (firstGrid) {
                    grid2._drawPDF(progress)
                        .then(function (secondGrid) {
                            secondGrid.children.forEach(function (x) {
                                firstGrid.children.push(x);
                            })
                            //return kendo.drawing.exportPDF(firstGrid, { multiPage: true });

                        })
                    grid3._drawPDF(progress)
                        .then(function (thirdGrid) {
                            thirdGrid.children.forEach(function (x) {
                                firstGrid.children.push(x);
                            })
                            //return kendo.drawing.exportPDF(firstGrid, { multiPage: true });
                        })
                    grid4._drawPDF(progress)
                        .then(function (fourthGrid) {
                            fourthGrid.children.forEach(function (x) {
                                firstGrid.children.push(x);
                            })
                            return kendo.drawing.exportPDF(firstGrid, { multiPage: true });
                        }).done(function (dataURI) {
                            kendo.saveAs({
                                dataURI: dataURI,
                                fileName: "SnowReporting.pdf"
                            });
                            progress.resolve();
                        })

                })

        })
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900