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

[Solved] Grid Filter similar to Excel 2007

5 Answers 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Herbert
Top achievements
Rank 1
Herbert asked on 14 Oct 2011, 06:50 PM
Hi,

Is it possible to modify the filter so that it also displays a unique list of values for that column which you can filter by?

I'm looking for something similar to the Excel-like filtering in the Telerik WPF grid.

Thanks.

5 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 18 Oct 2011, 08:39 AM
Hello Herbert,

 This is currently not possible. While the filtering menu can be customized the grid filtering engine does not support filtering by value in a range of chosen values which is a mandatory requirement. 

Regards,
Atanas Korchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Herbert
Top achievements
Rank 1
answered on 19 Oct 2011, 07:19 PM
Thanks for the reply.

If we want to implement our own filter menu completely, what would be the best approach to doing so? We want to implement it so that there will be checklist tree filter that will 'or' all the selected filters. Then 'and' it with the two textbox filters to create the final filter expression. Currently this is not supported in the control as the two textbox filters are just 'anded' together to create the filter expression.

The filters are in the form '(columnMember)~(operator)~(value)~and~(columnMember)~(operator)~(value)'
We want it so that the checklist filters are :
'(columnMember)~eq~(value)~or~(columnMember)~eq~(value)'

before anding them with the current two textbox filters to create filter expressions like:
(columnMember)~eq~(value)~or~(columnMember)~eq~(value)~and~(columnMember)~(operator)~(value)~and~(columnMember)~(operator)~(value)'

Also, are we allowed to modify the telerik.grid.filtering.js file?

Thanks.
0
Atanas Korchev
Telerik team
answered on 20 Oct 2011, 06:57 AM
Hi Herbert,

 The requirement which you describe would require entirely custom filtering UI (not part of the built-in menu which supports only single field filtering). Indeed you can construct a custom filter expression and pass it to the filter method. Still if you need the filtering UI to be part of the menu you can check this code library project for a working implementation.

 You are allowed to modify telerik.grid.filtering.js as you see fit. We however do not support any modifications to the source code.

Regards,
Atanas Korchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Herbert
Top achievements
Rank 1
answered on 21 Oct 2011, 04:42 PM
Hi,

In order to create the filter expressions I require the column members. How would you access the column objects from a view. Currently I can get the Html element for the Grid by calling $( grid ID) but I don't know how to get the Grid object which contains the column objects.

Thanks.
0
Atanas Korchev
Telerik team
answered on 24 Oct 2011, 09:29 AM
Hi Herbert,

You can get the grid client-side object like this:

var grid = $("#Grid").data("tGrid");

The grid has an array of columns:

var columns = grid.columns;

A column contains the column configuration. There is a member field which contains the member name:

var member = columns[0].member;

Regards,

Atanas Korchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Grid
Asked by
Herbert
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Herbert
Top achievements
Rank 1
Share this question
or