ASP.NET MVC ComboBox - Initial Text on Client-Side

Set Initial Text
The items of the ComboBox can be loaded on-demand (via AJAX requests). The advantage of using this approach is that the items are loaded only when the end user types something into the input field. Thus, the page will load very fast because no item is loaded on page load.

In order to enable the on demand loading feature, set the EnableLoadOnDemand property to true. You also need to specify an action method that will be used to load the items on demand, using the OnLoadingItems property. This action method will load all the items that match the text typed in the input field.

If you need to initially load the items that match a specific text, you need to use a ComboBoxItem that has its Text and Value properties set to the initial text that you want to search for. Also, the elected property of this ComboBoxItem needs to be set to true.

For this sample we used a JavaScript function to add a new item to the list and select it.
Then, when the user will focus the ComboBox, the items starting with "E" will be loaded.
View - Aspx
    <% Html.Obout(new ComboBox("ComboBox1") 
        EnableLoadOnDemand = true,
        OnLoadingItems = "ComboBox/LoadingItems"
    }); %>
    <% Html.Obout(new OboutButton("OboutButton1")
        OnClientClick = "setInitialText(); return false;"
    }); %>
View - Razor
    @Html.Obout(new ComboBox("ComboBox1") 
        EnableLoadOnDemand = true,
        OnLoadingItems = "ComboBox/LoadingItems"
    @Html.Obout(new OboutButton("OboutButton1")
        OnClientClick = "setInitialText(); return false;"
    function setInitialText() {
        ComboBox1._itemsLoadedOnOpen = false;
    public JsonResult LoadingItems(ComboBoxLoadingItemsEventArgs args)
        ComboBoxItemList items = GetFilteredCustomers(args.Text, 0);
        JsonResult result = new JsonResult
            Data = new {
                Items = items
            JsonRequestBehavior = JsonRequestBehavior.AllowGet

        return result;
    } Home 
ASP.NET MVC ComboBox Home   
ASP.NET MVC ComboBox Home 
Examples - 53
Appearance - 1 
Live Styles 
Autocomplete & Filtering - 2 
Load on Demand - 7 
Load Items on Demand 
Load Items on Demand with Paging  
Virtual Scrolling  
Initial Text  
Initial Text on Client-Side  
Load Items on Button Click  
Load Items with MinChars  
Multi-Columns - 4 
Grid-like Multi-Columns  
Grid-like Multi-Columns & Tooltips  
Multiple Rows and Columns  
State Selector  
Items with Icons - 3 
Items with Icons  
Grid-like Multi-Columns with Icons  
Multiple Rows and Columns with Icons  
Templates - 3 
Item Templates  
Header Templates  
Populating with Data - 1 
Populate with Data  
Item Selection - 6 
Single Item Selection  
Multi Item Selection  
Get Selected Item  
Get Selected Items  
Set Selected Item  
Set Selected Items  
Mode - 2 
Master/Detail - 3 
Unlimited Detail Levels  
Cascading ComboBoxes  
Integration - 3 
Items with ASP.NET CheckBoxes  
Items with Obout CheckBoxes  
RadioButtons inside ComboBox  
Settings - 8 
Server-Side API - 2 
Server-Side Events  
Enable / Disable  
Client-Side API - 8 
Client-Side Events  
Add / Remove Items  
Add Multi-Column Items  
Enable / Disable  
Get Selected Item  
Reset Selection  
Select / Deselect All Items  
Move Items  
Documentation - 1