Is there a way to remove the option to export to pdf from the ui-grid dropdown menu? I want to keep the export option to csv, but I can’t figure out how to remove the PDF function without removing all export options.
I edited this plunker from the docs to remove all scripts and JavaScript that are related to the pdf exponent. This effectively disables the functionality, but the export option to pdf is still available in the menu.
app.controller('MainCtrl', ['$scope', '$http', function ($scope, $http) {
$scope.gridOptions = {
columnDefs: [
{ field: 'name' },
{ field: 'gender', visible: false},
{ field: 'company' }
],
enableGridMenu: true,
enableSelectAll: true,
exporterCsvFilename: 'myFile.csv',
exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
onRegisterApi: function(gridApi){
$scope.gridApi = gridApi;
}
};
source
share