# Filter FlexGrid Data

Learn how to filter data with FlexGrid in this documentation topic

## Content

You can use the grid's **collectionView.filter** property directly. This is easy to do and very flexible, but you have to implement the filter UI yourself.

For example, this grid allows you to filter the data by country:
```javascript
// create grid
var theGrid = new wijmo.grid.FlexGrid('#theGrid', {
    itemsSource: data,
});
// update grid filter when filter textbox changes
document.getElementById('filter').addEventListener('input', function(e) {
    var filter = e.target.value.toLowerCase();
    theGrid.collectionView.filter = function(item) {
        return filter.length == 0 || item.country.toLowerCase().indexOf(filter) > -1
    }
});
```