SMART datagrid v.1 > Classes > ColumnFilter

Back  Forward

DataLudi.ColumnFilter.expression  property

Column filter discriminant. 

The row which is against this discriminant will not be displayed in grid during run time. In the table below, it has introduced Built-in Variables which can be used within the expression. 

Defaults to null.

Getter
function expression(): String
Setter
function setExpression(value: String)
Table-1  ColumnFilter.expression variables
VariableExplanation
'value'The value of this column data cell
'field'The index of data field connected to this column
'values'It gets the different field value of the same row by field name or field index.
Code -1
    grid.setColumns([{
        name: 'col_1',
        filters: [{
            name: 'filter_01',
            expression: "value > 10 && values['field_2'] == 'a'"
        }]
    },
    ...
    ]);
See Also
active
DataColumn.filters
GridBase.rowFilter
Examples
Column Filtering