Advanced filtering in a grid



Hi, I would like to filter rows in a grid in an analogous way like whole columns are hidden/shown by choosing them from a list. In a column there are 5 possible values and I need to show rows with several of these values simultaneously. In other words, I need users to be allowed to choose some of these five valid values. Is there any straightforward way how to implement this?

Hi,

There is no explicit support currently built into Grid for filtering. Depending on whether you are using in-memory or backend data provider, you’ll need to use slightly different approaches.

In your case, you’ll need to create a filter component such as a multi select combo box with the selectable values. Then add a value change listener and filter Grid’s data provider depending on the provider type you use.

Regarding creating filters, you can find some good description from Leif
in this thread
, I recommend you also reading the
docs about data providers
and, in case of backend data, especially the
lazy filtering section
.

By the way, I’m currently working on a filtering grid add-on that would make it easier to create filters for a grid.

Regards,
Adam