DHTMLX Docs & Samples Explorer

Index
dhtmlxDataView

## Filtering

Dataset can be filtered by one of multiple parameters. To apply simple one parameter filtering , code similar to the next can be used

    //will show object where string "Alex" exists in Maintainer name
    //by default filtering is case insensitive
        view.filter("Maintainer","Alex");

If some more complex filtering need to be applied, it possible through providing of filtering method as first parameter

        view.filter(function(obj){
            if (obj.valueA > 10 && obj.valueB < 100) return true;
            return false;
        })

Filtering method receives the object and filtering value ( if it was provided as part of filter command ). Result of method must be true - if object need to be shown and false otherwise.