Defining the Grid Filter
Summary
- The Grid Filter is defined in a Layout - either Table or Pivot
The Grid Filter in AdapTable is defined inside the Layout object
Caution
This means that the Grid Filter is per-Layout only
The Grid Filter can be defined for both Table and Pivot Layouts.
Developer Guide
Adding Grid Filter to Layout
const adaptableOptions: AdaptableOptions = {
const initialState: InitialState = {
Layout: {
CurrentLayout: 'Table Layout',
Layouts: [
{
Name: 'Table Layout',
TableColumns: ['currency', 'orderData', 'github_watchers', 'price'],
GridFilter: {
Expression: '[currency]="EUR" OR [price] > 5000)',
},
},
{
Name: 'Pivot Layout',
PivotColumns: ['language'],
PivotGroupedColumns: ['license'],
PivotAggregationColumns: [ { ColumnId: 'price', AggFunc: 'sum' } ],
GridFilter: {
Expression: '[currency]="EUR" OR [price] > 5000)',
},
},
]
}1
Add Grid Filter to the Layout Definition
Add the GridFilter prop to the Layout in order to filter across the whole Grid.
Add it separately to each Layout where you want to apply it.
The Grid Filter can be defined for both Table and Pivot Layouts.
2
Provide the Expression
The Grid Filter contains an Expression property.
This is a simple (Boolean) Expression that is evaluated by AdapTableQL.