Book Image

Kendo UI Cookbook

By : Sagar Ganatra
Book Image

Kendo UI Cookbook

By: Sagar Ganatra

Overview of this book

Table of Contents (18 chapters)
Kendo UI Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using filters to display data that matches certain criteria in the Grid


Similar to sorting columns in a Grid, you can update the Grid content by applying a filter. By applying a filter on the column, users will be able to search relevant data in the Grid that matches some criteria.

How to do it…

To make the columns in the Grid filterable, set the configuration option, filterable, to true, as shown in the following line of code. Similar to the sortable option, all columns in the Grid will be available for filtering by default. If you want some of the columns to not be available for filtering, then set filterable as false under columns.

filterable: true

How it works…

When you mark the columns for filtering, you will see a filter icon for each of the columns in the Grid.

When you click on it, you will be presented with a set of options that will allow you to get filtered data.

By default, users will be presented with two conditions to enter in the search criteria. In this example, the user has selected...