Wijmo Grid Column Filter Angular 15

Posted by: brzozowski.m24 on 8 April 2024, 8:04 pm EST

  • Posted 8 April 2024, 8:04 pm EST

    Hello,

    I’m struggling with an issue with column filtering in Wijmo Grid.

    I would like to provide a functionality to toggle column filtering on and off with a button. I’m changing filtering state with using *ngIf directive in Angular. My problem is once I toggle the state for filtering columns, and try to apply filtering on any column, glyph icon is not changing it’s color. Looks like filter is applied, but glyph icon claims that there is no filtering applied. This is causing me some more issues, but I don’t know how to fix this. Is it possible to hide filtering with *ngIf directive or I shoud use something else?

    This is the code to reproduce my issue:

    https://stackblitz.com/edit/angular-ikupqq?file=app%2Fapp.component.html,app%2Fapp.component.ts

    Thank you in advance.

  • Posted 9 April 2024, 11:41 pm EST

    Hello,

    To toggle filter icons dynamically, you can use the showFilterIcons property of FlexGridFilter and update its value based on the toggle variable. Here’s a code snippet demonstrating how to achieve this:

        <wj-flex-grid-filter
          #filter
          [defaultFilterType]="'Condition'"
          [showFilterIcons]="allowFilter ? true : false"
        ></wj-flex-grid-filter>

    Sample link: https://stackblitz.com/edit/angular-pksaui?file=app%2Fapp.component.html,app%2Fapp.component.ts

    Regards

  • Posted 10 April 2024, 1:06 am EST

    That’s exactly what I need, thank you!

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels