New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

Getting Started with the Telerik WebForms ComboBox

This tutorial will walk you through creating a RadComboBox and shows how to:

  • Create a simple RadComboBox with elements set in design time.

  • Populate RadComboBox from a data source.

Creating a Simple RadComboBox

  • Drag a RadComboBox from the Toolbox onto your Web Page.

  • The Smart Tag should appear automatically. From the Smart Tag, choose Build RadComboBox...

    Build ComboBox

  • The RadComboBox Item Builder appears.

  • Click the Add item icon in the upper left corner. A new RadComboBoxItem appears in the item builder.

    combobox additem

  • Set the Text property to "First Item".

  • Add two more items in the same way.

  • Press OK to exit the RadComboBox Item Builder.

  • Back in the Smart Tag, choose a Skin from the drop-down control.

    combobox smarttag

  • Right-click the RadComboBox instance and select Properties.

    ComboBox Properties

  • In the properties pane for the RadComboBox, Set the Height property to 150.

  • Run the application. Open the drop-down list to see the items.

    Simple ComboBox

Binding to an AccessDataSource

  • In order to bind the RadComboBox to an AccessDataSource, you must first have a DataSource component on your page. Drag an AccessDataSource component from the Toolbox onto the same page where your RadComboBox is.

    ComboBox Access Data Source

  • From the Smart Tag of the AccessDataSource, choose Configure DataSource.

    ComboBox Configure Data Source

  • Click the Browse button, locate, and select the AccessData File and press Next to continue.

    ComboBox Choose Data Base

  • Specify the columns from a table and press Next to continue.

    ComboBox Configure Data Source - Select

  • You may choose to test your Query to preview the data. Finally, press Finish to exit.

    ComboBox Test Query

  • On the RadComboBox Smart Tag, choose the AccessDataSource from the drop-down list labelled Choose Data Source.

    ComboBox Choose Data Source

  • In the properties pane for RadComboBox, set the DataTextField and DataValueField.

    ComboBox Data Properties

  • Run the application. The data from your table now appears in the RadComboBox.

    Bound ComboBox