Click here to Skip to main content
15,885,881 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have one image created dynamcally on page and bellow this grid is there. i want export of image and grid both.. i am doing gridexport using following code..but how to print image as it diaplyed on page in pdf.

//code calling on click of pdf
C#
function export() {
       var gview = $("#grid").data("kendoGrid");
       var dataSource = (gview != null) ? gview.dataSource : null;
       var filters = (dataSource != null) ? dataSource.filter() : null;
       var allData = dataSource.data();
       var query = new kendo.data.Query(allData);
       var data = query.filter(filters).data;
       var dataJSON = JSON.stringify(data);
       var dataJSONPG = dataJSON.replace(/'/g, "^");

       if (dataJSON != "[]") {
           $('body').prepend("<form method='post'  action='PDF_Export' style='top:-3333333333px;' id='tempFormPG'><input type='hidden' name='data' value='" + dataJSONPG + "' ></form>");
           $('#tempFormPG').submit();
           $("tempFormPG").remove();
       }

   }


passing grid data to method in controller and exporting code is in controler
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