@HTML.Dropdownlistfor custom filter

Viewed 16

I have this @HTML.dropdownlistfor it contains the data in the form of "AgentName (Country) - Branch name " form

so whenever I type any text in the filterbox it will include the values with agent name and branch name so for example my values are

  1. Kapil (India) - Mobwrist
  2. Risha (Ghana) - Telwall
  3. Monika (US) - Kapwan

so when I type 'Kap' in the serach box it will display value 1 and 3 both I want it to just filter value 1 , I need to display the text in the dropdown as it is so cannot modify that.

But I want to have a custom filter function which on filter will split the text on '(' and display the filter results of the first part of split text.

Thanks in advance...

0 Answers
Related