Version 1
Version 1


DataViewsJS allows you to write a string expression and use it in a filtering condition. You can implement simple as well as complex filtering expressions in code using'FILTER EXPRESSION') syntax.

Use the following steps to implement filtering in DataViewsJS.

Sample Code

These steps assume that you have already initialized the grid and defined the columns. See Creating a Basic Grid and Defining Columns for additional information.

Example 1
This example code uses a simple expression for filtering.'[quantity]>=5');

Example 2
This example code uses a complex expression for filtering to show records for United States with New York as the state and quantity greater than 5.'[Country]="United States" && [State]="NY" && [quantity] > 5');

See also