I'm submitting a ... (check one with "x")
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/ceolter/ag-grid/blob/master/CONTRIBUTING.md#question
Current behavior
Currently when exporting data as CSV, any data that is filtered out is not exported, even when only onlySelected
is set to true
. This may be confusing to the user.
Expected behavior
Even though a row is selected but filtered out, it is still selected and a user would expect it to be exported.
Ideally there would be an onlyFiltered
param for Data Export that you could set to false
in order to export all rows, even those that are filtered.
Minimal reproduction of the problem with instructions
gridOptions
. Set enableFilter
to true
.If the user was to export only selected rows to CSV, they would expect both Natalie Coughlin and Aleksey Nemov to be exported.
What is the motivation / use case for changing the behavior?
See example above.
Please tell us about your environment:
N/A
ag-Grid version: 8.0.1
Browser: N/A
Language: all
Hello @st-andrew
I've raised this feature request with the team. It's been added to our backlog and you can check progress on our pipeline page (AG-302):
Thanks @willhalling
Hi,
We are changing the process and closing all issues with a ticket number since they can be tracked from our pipeline https://www.ag-grid.com/ag-grid-pipeline/
Thanks
===============
If you are an ag-Grid Enterprise Customer, please raise this in our Zendesk support system - contact [email protected] for access. This is our primary channel for Support.
Bugs Raised Here:
We will do a periodic review of GitHub issues for any bugs raised and these can be tracked on our pipeline page: https://www.ag-grid.com/ag-grid-pipeline
Feature Requests/Support Raised Here:
We are reviewing how we process Feature Requests that come from GitHub. We currently have a very full pipeline of work which will be our priority for the coming months.
As a result, we don’t have capacity to take feature requests from GitHub.
We will review this as we move through our current backlog.
Thanks for your understanding.
ag-Grid Team.
Here is a ugly but a working patch for this issue, if anyone has a better solution please suggest.
onGridReady(params: DetailGridInfo) {
this.gridApi = params.api;
// Keep reference of original getType method
const rowModel = (<any>this.gridApi).rowModel;
rowModel._originalGetType = rowModel.getType;
rowModel._fakeGetType = () => Constants.ROW_MODEL_TYPE_SERVER_SIDE;
}
onDownloadButtonClick() {
const rowModel = (<any>this.gridApi).rowModel;
rowModel.getType = rowModel._fakeGetType;
this.gridApi.exportDataAsCsv({
fileName: 'all-records'
});
rowModel.getType = rowModel._originalGetType;
}
Versions
"ag-grid": "^18.1.2",
"ag-grid-angular": "^19.0.0",
"ag-grid-community": "^19.0.0",
Here is a ugly but a working patch for this issue, if anyone has a better solution please suggest.
onGridReady(params: DetailGridInfo) { this.gridApi = params.api; // Keep reference of original getType method const rowModel = (<any>this.gridApi).rowModel; rowModel._originalGetType = rowModel.getType; rowModel._fakeGetType = () => Constants.ROW_MODEL_TYPE_SERVER_SIDE; } onDownloadButtonClick() { const rowModel = (<any>this.gridApi).rowModel; rowModel.getType = rowModel._fakeGetType; this.gridApi.exportDataAsCsv({ fileName: 'all-records' }); rowModel.getType = rowModel._originalGetType; }
Versions
"ag-grid": "^18.1.2", "ag-grid-angular": "^19.0.0", "ag-grid-community": "^19.0.0",
thank you
Has this been fixed? I'm using the hack proposed by @heianqishizhisuiyuan. It is ugly, but works! Thanks!
Most helpful comment
Here is a ugly but a working patch for this issue, if anyone has a better solution please suggest.
Versions