We have a dynamically populated drop down list in a data grid
element. The dropdown works and we're able to filter by alpha
characters, but not the numerals that are in each option.
For
instance, each option would look like "12D - Diver". We want to
be able to filter by typing "diver", but not "12D".
I see where the placeholder content for the input element contains "Diver" and not "12D - Diver".
How do we implement this?
This is what the dropdown list looks like.
<SfDropDownList PopupWidth="400px"
Placeholder="@(serviceAssignment.Emp.Title ?? "---")"
TItem="Emp"
TValue="Emp"
Enabled="@(personnelCategory is not null && serviceCode is not null)"
Value="serviceAssignment.Emp"
ValueChanged="emp=>serviceAssignment.Emp = emp ?? serviceAssignment.Emp"
DataSource="@empSubsets.GetValueOrDefault(lookupKey, new List<Emp>())">
<DropDownListTemplates TItem="Emp">
<ItemTemplate Context="itemContext">
@{
Emp sa = (itemContext as Emp);
}
@if (!string.IsNullOrEmpty(sa.Code))
{
<span>@(sa.Code + " - " + sa.Title)</span>
}
</ItemTemplate>
</DropDownListTemplates>
<DropDownListEvents TValue="Emp" TItem="Emp" OnOpen="(args)=>OnEmpOpenHandler((ServiceAssignment)context, args)" />
<DropDownListFieldSettings Text="Title" Value="Code" />
</SfDropDownList>