Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Export - Include filtered rows #1499

Closed
maccuaa opened this issue Feb 28, 2017 · 6 comments
Closed

Data Export - Include filtered rows #1499

maccuaa opened this issue Feb 28, 2017 · 6 comments

Comments

@maccuaa
Copy link
Contributor

maccuaa commented Feb 28, 2017

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

  1. Grid Selection Example 2
  2. Add a break point and modify the gridOptions. Set enableFilter to true.
  3. Select Natalie Coughlin and Aleksey Nemov.
  4. Set Country filter to Russia
  5. Selection doesn't change.

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
@willhalling
Copy link

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):

https://www.ag-grid.com/ag-grid-pipeline/

@maccuaa
Copy link
Contributor Author

maccuaa commented Mar 1, 2017

Thanks @willhalling

@makinggoodsoftware
Copy link
Contributor

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 info@ag-grid.com 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.

@manojdcoder
Copy link

manojdcoder commented Oct 16, 2018

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",

@heianqishizhisuiyuan
Copy link

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

@PablocFonseca
Copy link

Has this been fixed? I'm using the hack proposed by @heianqishizhisuiyuan. It is ugly, but works! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants