Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Filter igx-grid by boolean column by default

On my igx-grid, how do I filter one of the columns by default to only values which are true?  I see there's an IgxBooleanFilteringOperand class but I can't figure out how to use it.  My grid column is defined like so:

<igx-column field="active" header="Active" [editable]="true" [dataType]="'boolean'"></igx-column>

  • 805
    Verified Answer
    Offline posted

    Hello Scott,

    There are two ways you can achieve that:

    1. Use the grid filter method. 

    This is the simples and fastest Pass your column with the filter term and the condition. In your case that would be:

    this.grid.filter('active', null, IgxBooleanFilteringOperand.instance().condition('true'));

    2. Build a filtering expression tree and pass it to the grid. This is a bit more complicated but you can apply multiple filters and filtering logic at once.

Reply Children
No Data