ComboBox - ComboBox Vs DropDownList

DropDownList

Alejandra Camino

ComboBox

DropDownList and ComboBox comparison
Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

This demo shows the advantages of using the RadDropDownList in some scenarios where the rich functionality of RadComboBox is not necessary but you need a simple drop down list for selection.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" ResponseEncoding="UTF-8"Inherits="ComboBox.Examples.Functionality.ComboBoxVSDropDownList.DefaultCS" Language="c#"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link rel="stylesheet" type="text/css" href="styles.css" />
</head>

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />

    <div class="demo-container">
        <h3>DropDownList</h3>
        <telerik:RadDropDownList RenderMode="Lightweight" ID="RadDropDownList1" runat="server" Width="300" Height="200px" DropDownHeight="200px"
            EmptyMessage="Search for people..." 
            DataSourceID="SqlDataSource1" DataTextField="ContactName" EnableVirtualScrolling="true">
        </telerik:RadDropDownList>
    </div>
    <div class="demo-container">
        <h3>ComboBox</h3>
        <telerik:RadComboBox RenderMode="Lightweight" ID="RadComboBox1" runat="server" Width="300" Height="200" 
            EmptyMessage="Select a Company" EnableLoadOnDemand="True" ShowMoreResultsBox="true"
            EnableVirtualScrolling="true" OnItemsRequested="RadComboBox1_ItemsRequested">
        </telerik:RadComboBox>
    </div>


    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        SelectCommand="SELECT [ContactName] FROM [Customers] Order By ContactName" />

    <div>
        <img class="comparison" alt="DropDownList and ComboBox comparison" src="Images/ComboBoxVSDropDownList.png" />
    </div>

    </form>
</body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?