Dropdown Filter on Multiple Columns
In my Telerik: Dropdown with Template article (link), I demonstrated how to configure a dropdown to display choices with multiple columns.
The dropdown provides a powerful and intuitive filter feature which by default allows the user to filter choices based on what they type into the filter textbox.
In this example, I’ll demonstrate how to configure the filter to search on more than one field within the choices.
I’ll begin with a simple dropdown displaying two columns for each choice.
The dropdown allows you to attach an event for filtering, on which you may provide custom logic to filter choices.
In this example, I’m attaching an event handler called “onFilterChoicesCoversheet.”
With my event handler defined, I’ll provide logic for the event.
Notice for the “logic” attribute I define “or” and on each filter the “field” matches those defined within the dropdown when displaying the data.
As you can see, my filter entry returns matches based on the first field (first choices) or second field (second choice).