New to Telerik UI for WinForms? Download free 30-day trial


The RadDropDownList.DropDownStyle property determines if the text area at the top of the control can be edited. A setting of DropDown (the default) allows editing and the DropDownList setting shows the text area as read-only.

Figure 1: DropDown

dropdown-and-listcontrol-dropdownlist-dropdownstyle 001

Figure 2: DropDownList

dropdown-and-listcontrol-dropdownlist-dropdownstyle 002

Setting DropDownStyle

this.radDropDownList1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown;

Me.radDropDownList1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown

When RadDropDownList is set to RadDropDownStyle.DropDownList one can control if an image will be displayed in the editor:

Image in Editor

this.radDropDownList1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
this.radDropDownList1.ShowImageInEditorArea = false;

Me.radDropDownList1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList
Me.radDropDownList1.ShowImageInEditorArea = False

User Defined Values

This section describes how user defined values can be added to the data source populating the items in RadDropDownList. For the purpose we are going to bind the control to a BindingList instance and add the newly created item if the Enter key has been pressed.

Fig.3 Adding User Defined Values

dropdown-and-listcontrol-dropdownlist-dropdownstyle 003

Initial Set Up

private BindingList<string> data;
public DropDownListUserDefinedValues()
    InitializeComponent(); = new BindingList<string>();"Sofia");"New York");"Delhi");"Tokyo");"Berlin");"Moscow");"Beijing");"Bern");"Paris");"London");
    this.radDropDownList1.DataSource =;
    this.radDropDownList1.KeyUp += radDropDownList1_KeyUp;

Private data As BindingList(Of String)
Public Sub New()
    InitializeComponent() = New BindingList(Of String)()"Sofia")"New York")"Delhi")"Tokyo")"Berlin")"Moscow")"Beijing")"Bern")"Paris")"London")
    Me.RadDropDownList1.DataSource =
    AddHandler Me.RadDropDownList1.KeyUp, AddressOf RadDropDownList1_KeyUp
End Sub

Now we need to handle the event, perform the required checks and update our data source.

Initial Set Up

private void radDropDownList1_KeyUp(object sender, KeyEventArgs e)
    string result = this.radDropDownList1.DropDownListElement.Text;
    if (e.KeyCode == Keys.Enter && !
    {, result);

Private Sub RadDropDownList1_KeyUp(sender As Object, e As KeyEventArgs)
    Dim result As String = Me.RadDropDownList1.DropDownListElement.Text
    If e.KeyCode = Keys.Enter AndAlso Not Then, result)
    End If
End Sub

See Also

In this article
Not finding the help you need? Improve this article