New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Transfer

  • Argentina
  • Australia
  • Brazil
  • Canada
  • Chile
  • China
  • Egypt
  • England
  • France
  • Germany
  • India
  • Indonesia
  • Kenya
  • Mexico
  • New Zealand
  • South Africa
  • USA
  • Demo Configurator
Buttons Alignment

RadListBox supports items transferring via transfer buttons, mouse double click and drag and drop.

To enable the transfer functionality you need to set the AllowTransfer property to true. After that, four buttons will appear next to your RadListBox.

You can configure the position of the buttons using the ListBoxButtonPosition enumeration. There are four possible values: Top, Bottom, Left and Right.

The transfer buttons support rendering text and localization. You can use the RenderButtonText of the ListBoxButtonSettings class.

RadListBox control also supports transferring items on double click. In order to enable this feature you need to set the AllowTransferOnDoubleClick property to true. The behavior is the same as if you are using the default buttons.

In addition to this, you can transfer items using Drag and Drop. To use this feature you need to set the EnableDragAndDrop property to true.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="ListBox.Examples.Functionality.Transfer.DefaultCS" %>

<!DOCTYPE html>
<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 size-narrow">
        <div class="wrapper">
            <telerik:RadListBox RenderMode="Lightweight" runat="server" ID="RadListBoxSource" Height="200px" Width="230px" Skin="Telerik"
                AllowTransfer="true" TransferToID="RadListBoxDestination" ButtonSettings-AreaWidth="35px" >
                <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 RenderMode="Lightweight" runat="server" ID="RadListBoxDestination" Height="200px" Width="200px" Skin="Telerik">
            </telerik:RadListBox>
        </div>
    </div>


    <qsf:ConfiguratorPanel runat="server" ID="ConfiguratorPanel1">
        <Views>
            <qsf:View>
                <qsf:ConfiguratorColumn runat="server" Size="Medium">
                    <ul class="fb-group">
                        <li>
                            <asp:CheckBox ID="AllowTransfer" runat="server" AutoPostBack="True" Checked="True" Text="Allow transfer" /></li>
                        <li>
                            <asp:CheckBox ID="AutoPostbackOnTransfer" runat="server" AutoPostBack="true" Text="Auto postback on transfer" Checked="true" /></li>
                        <li>
                            <asp:CheckBox ID="AllowTransferDuplicates" runat="server" AutoPostBack="True" Text="Allow duplicates in destination" Checked="true" /></li>
                        <li>
                            <asp:CheckBox ID="AllowTransferOnDblCLick" runat="server" AutoPostBack="True" Text="Allow transfer on double click" Checked="true" /></li>
                        <li>
                            <asp:CheckBox ID="AllowTransferViaDragNDrop" runat="server" AutoPostBack="True" Text="Allow transfer via drag and drop" Checked="true" /></li>
                        <li>
                            <asp:CheckBox ID="ShowTransferAll" runat="server" AutoPostBack="true" Text="Show transfer all buttons" Checked="true" /></li>
                    </ul>
                </qsf:ConfiguratorColumn>

                <qsf:ConfiguratorColumn runat="server" Size="Narrow">
                    <span class="label">Buttons Alignment</span>
                    <qsf:RadioButtonList runat="server" ID="ListBoxPosition" AutoPostBack="true" Orientation="Horizontal">
                        <asp:ListItem Text="Horizontal" Value="Horizontal" Selected="True" />
                        <asp:ListItem Text="Vertical" Value="Vertical" />
                    </qsf:RadioButtonList>
                </qsf:ConfiguratorColumn>
            </qsf:View>
        </Views>
    </qsf:ConfiguratorPanel>

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

Support & Learning Resources

Find Assistance