/
setFilter( columnIndex, expression )

setFilter( columnIndex, expression )

 

This method filters grid data by applying a filter expression to a specific column. The expression is not case sensitive. The filtered text may be highlighted. The highlighting can be cleared using the clearHighlighting() method on the grid.

Parameters:

  • columnIndex - index to identify the column, where 0 is the first column, 1 is the second column, etc. For client-side filtering, a special value of "*all" can be specified, which triggers a filter on all columns.

  • expression - expression to filter grid data, with the following syntax:

    • xyz - searches for all data containing 'xyz'

    • between aaa and zzz - searches for alphanumeric values between 'aaa' and 'zzz'

    • between 10 and 20 - searches for numeric values between 10 and 20 

    • starts with xyz - searches for all data that starts with 'xyz'

    • values A, B, C, etc. - searches for a list of values (exact matches)

    • jvalues [“x”,”y”,”z”] - same as “values”, above, except the list is a JSON array of strings.

    • =xyz - searches for data equal exactly to 'xyz'

    • >123 - greater than search

    • >=123 - greater or equal to search

    • <123 - less than search

    • <=123 - less than or equal to search

    • !=xyz - searches for alphanumeric values that do not contain 'xyz'

    • !=123 - searches for numeric values that are not equal to 123

*Column 0 refers to the first column as established during design-time (in Visual Designer). If