0
votes

I have a ag-grid in my Angular2 project with different columns (First Name, Last Name, Address, Phone Number). In that i have placed a filter. That filter works for entire table but i'm trying to do every column with individual filter input section (or) a filter input field according to the first name column.For more details view the picture==> Chick here to view the Picture

Can any one help me.

Thank you

1

1 Answers

0
votes

You can try accessing the filter via the filterFramework property of ColDef in the header component or in the main component by provided api.

        let field = this.params.column.getColId();
        //or field_name like (let field = 'first_name';)
        let agGridFilter = this.gridOptions.api.getFilterInstance(field);
        this.filterInstance = agGridFilter.getFrameworkComponentInstance();

. For more details you can read this post