Searchable

Setting the Searchable property to true allows the user to find an option using wildcard searching. The sample also demonstrates use of the EmptyOption property which allows custom text to be shown for the empty (unselected) option

Loading...
Razor code

SelectModel customerSelect = new SelectModel(DataSourceType.SQLite, "northwind", "Customers")
{
    Caption = "Customer",
    Searchable = true,
    EmptyOption = "Please select a customer",
    Columns = new List()
    {
        new SelectColumn("CustomerID"),
        new SelectColumn("CompanyName")
    }
};
customerSelect.ClientEvents[SelectClientEvent.OptionSelected] = "showSelectedCustomer";
@(await new DbNetSuiteCore.SelectControl(HttpContext).Render(customerSelect))
<div id="selectedCustomer"></div>