Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
145976 | Jul 16,2019 01:14 PM UTC | Jul 18,2019 10:49 AM UTC | JavaScript - EJ 2 | 3 |
![]() |
Tags: Grid |
<script>
var grid = new ej.grids.Grid({
dataSource: orderData,
allowFiltering: true,
allowPdfExport: true,
filterSettings: { type: 'Excel' },
toolbar: ['PdfExport'],
toolbarClick: function (args) {
if (args.item.text === 'PDF Export') {
let query = grid.renderModule.data.generateQuery(true); // get grid corresponding query
grid.getDataModule().executeQuery(query).then((e) => {
console.log(e.result);
grid.pdfExport({ dataSource: e.result }); //Export the filtered data.
}).catch((e) => {
console.log(e);
})
}
},
enableVirtualization: true,
height: 400,
. . .
. . .
});
grid.appendTo('#Grid');
</script> |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.