This is a migrated thread and some comments may be shown as answers.

Get all grid filters

1 Answer 2179 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 2
Mike asked on 15 May 2012, 06:29 PM
Is there any way to grab an array of all the grid filters that a user has filled out without them pressing the "Filter" buttons? Before a user presses the "Filter" button, dataSource.filter() is undefined, but after pressing filter it is populated. I would like to be able to have all filter values that a user has entered in other columns (without pressing the "filter" button in each column) to be created. As it is right now, if I want to filter on 4 different columns, the user must click filter 4 times - which may not be intuitive to most users. 

Also, are there any plans in the future to allow users to define how column filters join together in the UI? The ideal end result would be: "(Column1Filters) AND (Column2Filters) OR (Column3Filters)" or at least a toggle between using "AND" or "OR" for joining all column filters in the header of the grid.

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 18 May 2012, 07:57 AM
Hello Mike,

This functionality is not supported out of the box - the dataSource.filter() method returns the currently applied filters. If you want to retrieve the filled out menu descriptors before the dataSource is filtered, you should get the values of the corresponding inputs with custom code.

As an alternative, you can disable the filter functionality (filterable: false), build your own user interface and filter through the dataSource API. In these forum topics (link1, link2) you can find more information and example explaining how to create complex filters (including toggling between AND / OR).

I hope this helps.

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Mike
Top achievements
Rank 2
Answers by
Alexander Valchev
Telerik team
Share this question
or