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

Multi filter - use client template data

1 Answer 341 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Marc asked on 26 Jul 2017, 09:35 PM

If we have a client template on a column, is there an easy way to have the multi filter use that value?


columns.Bound(c => c.Logon).Filterable(f => f.Multi(true)).ClientTemplate("#= FullName #")


We want FullName in the filter dropdown. 



1 Answer, 1 is accepted

Sort by
Telerik team
answered on 28 Jul 2017, 08:42 AM
Hello Marc,

The Grid does not provide this functionality out of the box.

A possible solution for achieving the desired behavior is handling the filterMenuInit event. In the event handler function, get the list of node values and update the text using the same logic as the client template.
For example, the code might look like:

filterMenuInit: function(e){
    var label = $(this).find("label");
    var text = label[0].lastChild.nodeValue;
    label[0].lastChild.nodeValue = changeLabelText(text);
function changeLabelText(text){
  if(text==="Select All") return text;
  return text + " +templateText";

For a runnable example, check this Dojo:

I hope the above helps.

Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question