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

[Solved] Creating Custom Column Filter in MVC without AJAX Request

1 Answer 357 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 19 Dec 2014, 07:06 PM
I would like to create a custom column filter and specify the values in my view. All of the examples I have found make reference to a javascript function, which then calls backs to the controller. Rather than calling back to the controller, I would like to pass those values directly into the view. Perhaps there is a simple way of doing this, but I have not found it. Ideally, if I could just define in my view a dropdown box which would be used as the filter, that would be perfect, but that does not seem possible.

It seems that Kendo.Mvc.UI.Fluent.GridBoundColumnFilterableBuilder.UI(System.Func<System.Object,System.Object>) would be the best way to achieve this...

Do you have any examples of this in use? I don't understand how the javascript function specifies the id of the column filter to modify.

It seems I could pass in a JavaScript function (although ideally I would be able to do this in razor), which would create a kendo drop down box to use as a filter.

Thanks in advance!

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 23 Dec 2014, 10:13 AM
Hi Patrick,

The desired behavior of filtering the Grid using separate widget (DropDownList) is already demonstrated in the following demo (source code is available under the demo):

Also please note that the above demo can be found in the offline application that comes with your Telerik UI for ASP.NET MVC installation:

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