Configures the filtering behavior of the TreeGrid.
Specifies the columns to be filtered at initial rendering of the TreeGrid. You can also get the columns that were currently filtered.
Defaults to []
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
boolean
If ignoreAccent set to true, then filter ignores the diacritic characters or accents while filtering.
Check the
Diacritics
filtering.
Defaults to false
number
Defines the time delay (in milliseconds) in filtering records when the Immediate
mode of filter bar is set.
Defaults to 1500
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
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
boolean
Shows or hides the filtered status message on the pager.
Defaults to true
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