I have used select2 type dropdown and bind with value-text pairs and it's doing filter properly based on (tenancyname) text as per below.
<li class="dropdown" id="liTenancy" style="margin-top: 4px; min-width: 250px !important;">
<select class="form-control select2me" data-placeholder="Select..." style="white-space: nowrap;">
@foreach (var Tenancy in Entity)
{
<option @(SelectedTenancy == Tenancy.TenancyId ? "selected=\"selected\"" : "") value="@Tenancy.TenancyId">
<a class="optionTenancy" href="javascript:void(0);" id="@Tenancy.TenancyId">@Tenancy.TenancyName</a>
</option>
}
</select>
</li>
Now i would like to filter this list with tenancyname (text) or tenancyid (value) (user can user both to filter list) then how can i customize js without doing it with remote call??