Example 1
<SfAutoComplete TValue="string" TItem="Customer" Placeholder="Customer" FloatLabelType="@FloatLabelType.Always" PopupHeight="400px" CssClass="e-multi-column" DataSource="@CustomerList" @bind-Value="@SelectedCustomer">
<AutoCompleteTemplates TItem="Customer">
<HeaderTemplate>
<table><tr><th>Name</th><th>Phone</th><th>Email</th></tr></table>
</HeaderTemplate>
<ItemTemplate>
<table><tbody><tr><td>@((context as Customer).DisplayName)</td><td>@((context as Customer).Phone)</td><td>@((context as Customer).Email)</td></tr> </tbody></table>
</ItemTemplate>
</AutoCompleteTemplates>
<AutoCompleteFieldSettings Value="AutoCompleteText"></AutoCompleteFieldSettings>
</SfAutoComplete>
Example 2
<AutoCompleteTemplates TItem="Product">
<HeaderTemplate>
<table><tr><th class="e-text-center">Product ID</th><th width="240px">Product Name</th><th>Unit Price</th><th>Units In Stock</th><th>Units On Order</th></tr></table>
</HeaderTemplate>
<ItemTemplate>
<table><tbody><tr><td class="e-text-center">@((context as Product).ProductID)</td><td width="240px">@((context as Product).ProductName)</td><td>@((context as Product).UnitPrice)</td><td>@((context as Product).UnitsInStock)</td><td>@((context as Product).UnitsOnOrder)</td></tr> </tbody></table>
</ItemTemplate>
</AutoCompleteTemplates>
Comments