Wijmo UI for the Web
filter Field

Default value: null

Sets or returns a variant that contains a filter for the data in a recordset. The filter allows you to get records that satisfy a specified criterion.

Syntax
Javascript (Usage) 
var instance; // Type: wijmo.data.IShape;
var value; // Type: any
value = instance.filter;
Javascript (Specification) 
var filter : any;
Example
The Quick Start sample shows a similar implementation using Knockout. To use the property without using KnockOut, use the document ready function as in this example.
$(document).ready(function () {
            var productView = new wijmo.data.ArrayDataView(sourceData());

            $("#demo-grid").wijgrid({ 
                data: productView, 
            });
In this example, the filtering criteria is set to Category Id of products. Click the Beverages button to display all the beverage items with Category Id 1.
$("#clearFilter").click(function () {
    productView.filter(null);
});
$("#filterBeverages").click(function () {
    productView.filter({ Category_ID: 1 });
});
Browser Compatibility
7
5
5

See Also

Reference

IShape Interface

 

 


© 2013 All Rights Reserved.

Send comments on this topic.