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

Additonal Parameters with Filterable.UI

1 Answer 355 Views
Grid
This is a migrated thread and some comments may be shown as answers.
StuartF
Top achievements
Rank 1
StuartF asked on 24 Oct 2014, 09:07 AM
I'm currently looking at Filters on the ASP MVC grid. 

I have this line on my grid:

.Filterable(filterable => filterable.UI("$.fn.kendogrid().userDropdownFilter"))

which works fine, and I can access the original filter element in the userDropdownFilter(element) function in my JavaScript.

I was wondering if it was possible to send additional parameters to this function though, and still pass the original element variable?

Thanks

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 28 Oct 2014, 08:38 AM
Hi StuartF,

This could be done by using a simple proxy function. For example: 
columns.Bound(p => p.ProductName).Filterable(x => x.UI(@<text>function(e){ myCustomFilter(e, "customParameter") }</text>));
...
<script type="text/javascript"
    function myCustomFilter(e, param) {
        alert(param)
    }
</script>


Regards,
Alexander Popov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
StuartF
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or