Search results

FilterSettings API in Angular TreeGrid API component

Configures the filtering behavior of the TreeGrid.

Properties

columns

PredicateModel[]

Specifies the columns to be filtered at initial rendering of the TreeGrid. You can also get the columns that were currently filtered.

Defaults to []

hierarchyMode

FilterHierarchyMode

Defines the filter hierarchy modes. The available options are,

*  Parent :- Shows the filtered record with parent record.
*  Child :- Shows the filtered record with child record.
*  Both :- Shows the filtered record with both parent and child record.
*  None :- Shows only the filtered record.
    <ejs-treegrid #treegrid [dataSource]='data' childMapping='subtasks' [treeColumnIndex]='1'
    allowFiltering='true' [filterSettings]='filterSettings'>
    </ejs-treegrid>
import { Component, OnInit } from '@angular/core';
import { TreeGridComponent, FilterService } from '@syncfusion/ej2-angular-treegrid';

@Component({
    selector: 'app-root',
    templateUrl: 'app.component.html',
    providers: [FilterService]
})
export class AppComponent {
    constructor() {}
    public data: Object[] = [];
    public filterSettings: Object;

    ngOnInit(): void {
        this.data = sampleData;
        this.filterSettings = { type: 'Menu', hierarchyMode: 'Parent' };
    }
}

Defaults to Parent

ignoreAccent

boolean

If ignoreAccent set to true, then filter ignores the diacritic characters or accents while filtering.

Check the Diacritics filtering.

Defaults to false

immediateModeDelay

number

Defines the time delay (in milliseconds) in filtering records when the Immediate mode of filter bar is set.

Defaults to 1500

mode

FilterBarMode

Defines the filter bar modes. The available options are,

*  OnEnter :- Initiates filter operation after Enter key is pressed.
*  Immediate :- Initiates filter operation after a certain time interval. By default, time interval is 1500 ms.

Defaults to Syncfusion.EJ2.Grids.FilterBarMode.OnEnter

operators

ICustomOptr

The operators is used to override the default operators in filter menu. This should be defined by type wise (string, number, date and boolean). Based on the column type, this customize operator list will render in filter menu.

Check the Filter Menu Operator customization.

Defaults to null

showFilterBarStatus

boolean

Shows or hides the filtered status message on the pager.

Defaults to true

type

FilterType

Defines options for filtering type. The available options are

  • Menu - Specifies the filter type as menu.
  • FilterBar - Specifies the filter type as filterbar.

Defaults to FilterBar