Reputation: 1404
I am exporting the ui-grid to CSV using the angular ui grid exporter. Is there a way to update the header name while exporting it to CSV/PDF. I am using exporterFieldCallback to format some of the values in the table, but when I try to update the header name in exporterFieldCallback from col, it does not take effect.
I also would like to know if its possible to suppress a row from exporting.
Upvotes: 0
Views: 1132
Reputation: 629
You can use exporterHeaderFilter
callback in your gridOptions to change the column header before exporting it. For example:
exporterHeaderFilter: function (name) {
// do something with name
return name;
}
I don't know if it's possible to suppress a single row, but I would suggest to enable filtering and then export only visible data or use the option to export only selected rows.
Upvotes: 1