Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

343
Views
use of use `getfilterinstance` in angular

i have a doubt, i use gridapi.getfilterinstance in the angular app it works fine. but the main problem is that i create a custom search box and i have two columns in grid table firstname and lastname

i want to search in both of them. what i create is

  onSearch() {
    const row = this.reportTable.gridApi.getFilterInstance('contact.firstName');
    let filter = this.form.value['text'];
    let condition = {
      type: 'startsWith',
      filter
    };
    row.setModel(condition);
    this.reportTable.gridApi.onFilterChanged();
  }
<button class="primary-btn mr-2" (click)="onSearch()">
 Search
</button>

i need another condition with this firstname instance i,e. contact.lastName which is trigger with the same search button and search field.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I would suggest using an external filter. This enables you to search based on whatever condition you want. In your case this would be against firstName and lastName. Main steps are:

  1. Provide a function that returns true when you want to use your external filter to isExternalFilterPresent
  2. Implement doesExternalFilterPass with your custom logic.

I have created a plunkr based of the documentation example that shows filtering based off both the athlete name or country.

https://plnkr.co/edit/9DkvMyH234Xr8CJo

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!