UI-Grid multiple grid PDF export
I have two controllers with one grid each. When I try to do the following: $scope.export = function(){ console.log("$scope.export"); $scope.gridApi.exporter.pdfExport(uiGridExporterConstants.ALL); };
it only exports the first grid. How can I export both grids in one PDF. Been fiddling with it a lot, cant find the right answers. Help will be appreciated.
You need to export from each grid independently. The gridApi that you export from will be the grid that is exported - you need to get a separate gridApi from each gridOptions.
Right now I am calling it like this div ng-controller="MainCtrl"> button ng-click="export()">PDF Export</button
in the html page. I just want a single export btn to export both grid in one pdf.
eg. ng-controller="MainCtrl" ng-Controller="SecondCtrl"
I think this is more of a js question than a grid question. Essentially you'll need to call export separately on each grid. If the gridApi is in different controllers, then you'll need to write a service or something else to make the export button able to call cross-controller. Do they need to be in separate controllers,? It'd be easier if they weren't.
I am new to Angular JS or even JS. I tried setting the data in one controller with two $scope, but when I run the export function only the bottom $scope is displayed in PDF.
$scope.gridApi.exporter.pdfExport(uiGridExporterConstants.ALL);
Using this as an export parameter. Here is the plunker: http://plnkr.co/edit/MOzqyVGf2lBqc9LUazXu?p=preview
This is a useful request, but not really in the current roadmap. We have far too many good ideas in the repository already, giving the impression that we have a project riven with defects.
Accordingly, I am leaving the enhancement tag on this, but closing it. If someone would like this functionality, we'd welcome a pull request that adds it.
@proNueb Hey ,I have the same requirement as yours that is exporting multiple UI grid data within a controller to a single pdf. Were you able to come up with the solution?
We started using kendo grid. And they have functional excel and PDF export.
Thank you,
On Nov 18, 2016 3:37 AM, "shwetaku" [email protected] wrote:
@proNueb Hey ,I have the same requirement as yours that is exporting multiple UI grid data within a controller to a single pdf. Were you able to come up with the solution?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
us too, any solution ?
Hey,I have the same requirement to export multiple UI grids data to single pdf/csv. Were you able to come up with a solution?
PRs are welcome!
I have the same need: exporting multiple grids data to single csv. Anyone figured out a solutions? Thanks in advance.
Please include this feature, I need to export multiple grids as different sheets in single csv file. Anyone tried like this ??