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

Grid FilterTemplates

2 Answers 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
J Schep
Top achievements
Rank 1
J Schep asked on 11 Jul 2012, 09:13 PM
I need grid filter controls which look like the Telerik WPF or Silverlight filters (see attached image).  The ASP.NET AJAX suite has FilterTemplates.  The Telerik .NET MVC controls do not, and I can't find anything like it in the KendoUI.  Is there a way to get custom filters like the one in the image?  I specifically need this when the filter icon is clicked, not somewhere else on the page.

2 Answers, 1 is accepted

Sort by
0
Vesselin Obreshkov
Top achievements
Rank 2
answered on 12 Jul 2012, 12:29 AM
Take a look at this forum post. It doesn't do exactly what you're asking for but it might help you manipulate the filter dialog to do what you need. 

http://www.telerik.com/community/forums/aspnet-mvc/grid/have-another-default-telerik-filter.aspx 

The important part is pasted below. You attach it to your grid's load event and mess with the filter dialog. This example changes the default filter to 'contains' instead of 'is equal to' but you could also do other things as long as you send the correct filter values in the end. This example is for the Telerik MVC extensions but replacing "t-" with "k-" in the class names should give you the desired result.

function onGridLoad(){
        $('.t-grid-filter').one('click'function () {
            var container = $(this).data().filter;
            $('.t-filter-operator',container).val('substringof');
        });
}
0
J Schep
Top achievements
Rank 1
answered on 12 Jul 2012, 03:59 PM
This doesn't quite accomplish what I need.  I specifically need the ability to swap controls in order to create filters that resemble those of the Silverlight and WPF filters.  If you look at the image from my previous post, you can see what I am looking for in an end product.
Tags
Grid
Asked by
J Schep
Top achievements
Rank 1
Answers by
Vesselin Obreshkov
Top achievements
Rank 2
J Schep
Top achievements
Rank 1
Share this question
or