Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

ListBox / First Look

Configuration
Source ListBox:
  • select
Destination ListBox:
    
  • Argentina
  • Australia
  • Brazil
  • Canada
  • Chile
  • China
  • Egypt
  • England
  • France
  • Germany
  • India
  • Indonesia
  • Kenya
  • Mexico
  • New Zealand
  • South Africa
  • USA

  • RadListBox is a powerful ASP.NET AJAX control to display a list of items. It allows for multiple selection of items, reorder and transfer between two listboxes. Drag and drop is fully supported as well. You can easily control the appearance by arranging the buttons in different layouts or changing their text. Icons and checkboxes are also supported within the listbox items.

    The RadListBox implements a highly efficient semantic rendering, which uses list items and CSS instead of tables. As a result the HTML output is significantly reduced, which dramatically improves performance.

    The control can also be bound to all ASP.NET 2.0 declarative datasources (ObjectDataSource, XmlDataSource, SqlDataSource, etc) as well as the ASP.NET 3.5 LinqDataSource. Binding to XML strings as well as automatic database updates are fully supported.

    RadListBox control has a rich client-side API and comprehensive set of events guaranteeing full control over various functions performed on the client. You can easily add/delete/update items at the client side and all the changes will be persisted on the server as well. The rich client-side API provides unbeatable performance and desktop-like experience.

    RadListBox is shipped with a rich set of skins that allow you to easily build slick interfaces with the look-and-feel of Windows Vista, Office 2007, Outlook, etc. The skins can be easily switched using a single property.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="ListBox_Examples_FirstLook_DefaultCS" %>

    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

    <!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">
        <qsf:HeadTag runat="server" ID="Headtag1" />
        
        <link href="styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body class="BODY">
    <form runat="server" id="mainForm" method="post">
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <qsf:Header runat="server" ID="Header1" NavigationLanguage="C#" />
        <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">
        <qsf:ConfiguratorPanel runat="server" ID="ConfigurationPanel1" Title="Configuration" Orientation="Vertical" Expanded="true">
            <span class="title">Source ListBox:</span>
            <ul>
                <li><asp:CheckBox ID="AllowTransfer" runat="server" AutoPostBack="True" Checked="True" Text="Allow transfer" /></li>
                <li class="dependant">
                    <asp:Label runat="server" ID="DDTransferModeLabel" AssociatedControlID="DDTransferMode" Text="Transfer mode:" />
                    <telerik:RadComboBox runat="server" ID="DDTransferMode" AutoPostBack="true" Width="70px">
                        <Items>
                            <telerik:RadComboBoxItem Text="Move" Selected="true" />
                            <telerik:RadComboBoxItem Text="Copy" />
                        </Items>
                    </telerik:RadComboBox>
                </li>
                <li class="dependant"><asp:CheckBox ID="AllowTransferDuplicates" runat="server" AutoPostBack="True" Text="Allow duplicates in destination" /></li>
                <li><asp:CheckBox ID="AllowReorderSource" runat="server" AutoPostBack="True" Text="Allow reorder" /></li>
                <li><asp:CheckBox ID="AllowMultipleSelection" runat="server" AutoPostBack="True" Text="Allow multiple selection" /></li>
            </ul>
            
            <span class="title">Destination ListBox:</span>
            <ul>
                <li><asp:CheckBox ID="AllowDelete" runat="server" AutoPostBack="True" Checked="True" Text="Allow delete" /></li>
                <li><asp:CheckBox ID="AllowReorder" runat="server" AutoPostBack="True" Checked="true" Text="Allow reorder" /></li>
            </ul>
        </qsf:ConfiguratorPanel>
        <telerik:RadListBox
            runat="server" ID="RadListBoxSource"
            Height="200px" Width="200px"
            AllowTransfer="true" TransferToID="RadListBoxDestination">
            <Items>
                <telerik:RadListBoxItem Text="Argentina" />
                <telerik:RadListBoxItem Text="Australia" />
                <telerik:RadListBoxItem Text="Brazil" />
                <telerik:RadListBoxItem Text="Canada" />
                <telerik:RadListBoxItem Text="Chile" />
                <telerik:RadListBoxItem Text="China" />
                <telerik:RadListBoxItem Text="Egypt" />
                <telerik:RadListBoxItem Text="England" />
                <telerik:RadListBoxItem Text="France" />
                <telerik:RadListBoxItem Text="Germany" />
                <telerik:RadListBoxItem Text="India" />
                <telerik:RadListBoxItem Text="Indonesia" />
                <telerik:RadListBoxItem Text="Kenya" />
                <telerik:RadListBoxItem Text="Mexico" />
                <telerik:RadListBoxItem Text="New Zealand" />
                <telerik:RadListBoxItem Text="South Africa" />
                <telerik:RadListBoxItem Text="USA" />
            </Items>
        </telerik:RadListBox>
        
        <telerik:RadListBox
            runat="server" ID="RadListBoxDestination"
            Height="200px" Width="200px" />
        
    </telerik:RadAjaxPanel>    
        <qsf:Footer runat="server" ID="Footer1" />
    </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451