ListBox - Right-to-left Support

  • Argentina
  • Australia
  • Brazil
  • Canada
  • Chile
  • China
  • Egypt
  • England
  • France
  • Germany
  • India
  • Indonesia
  • Kenya
  • Mexico
  • New Zealand
  • South Africa
  • USA
Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

RadListBox provides support for RTL languages.

RadListBox considers the direction attribute set to the control itself or any parent HTML element. If you set the direction of the body tag (or any other parent element that contains the control) to rtl, RadListBox reverses the item order and aligns itself to the right side of the container. However, if you need to change the direction of the transfer buttons as well you will need to include the following settings to the RadListBox control:

<telerik:ListBox ID="ListBox1" runat="server" dir="rtl"> or simply an outer div with dir="rtl" as implemented in the demo

<ButtonSettings AreaWidth="100px" Position="Left" />
  • DefaultCS.aspx
<%@ Page AutoEventWireup="true" Language="c#"  %>

<%@ 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">
    <title>Telerik ASP.NET Example</title>
</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-medium" dir="rtl">
        <telerik:RadListBox RenderMode="Lightweight" runat="server" ID="RadListBox1" Width="300px" Height="200px" dir="rtl"
            AllowTransfer="true" TransferToID="RadListBoxDestination" ButtonSettings-RenderButtonText="true">
            <ButtonSettings AreaWidth="140px" Position="Left"></ButtonSettings>
            <Items>
                <telerik:RadListBoxItem Text="Argentina"></telerik:RadListBoxItem>
                <telerik:RadListBoxItem Text="Australia"></telerik:RadListBoxItem>
                <telerik:RadListBoxItem Text="Brazil"></telerik:RadListBoxItem>
                <telerik:RadListBoxItem Text="Canada"></telerik:RadListBoxItem>
                <telerik:RadListBoxItem Text="Chile"></telerik:RadListBoxItem>
                <telerik:RadListBoxItem Text="China"></telerik:RadListBoxItem>
                <telerik:RadListBoxItem Text="Egypt"></telerik:RadListBoxItem>
                <telerik:RadListBoxItem Text="England"></telerik:RadListBoxItem>
                <telerik:RadListBoxItem Text="France"></telerik:RadListBoxItem>
                <telerik:RadListBoxItem Text="Germany"></telerik:RadListBoxItem>
                <telerik:RadListBoxItem Text="India"></telerik:RadListBoxItem>
                <telerik:RadListBoxItem Text="Indonesia"></telerik:RadListBoxItem>
                <telerik:RadListBoxItem Text="Kenya"></telerik:RadListBoxItem>
                <telerik:RadListBoxItem Text="Mexico"></telerik:RadListBoxItem>
                <telerik:RadListBoxItem Text="New Zealand"></telerik:RadListBoxItem>
                <telerik:RadListBoxItem Text="South Africa"></telerik:RadListBoxItem>
                <telerik:RadListBoxItem Text="USA"></telerik:RadListBoxItem>
            </Items>
        </telerik:RadListBox>
        <telerik:RadListBox RenderMode="Lightweight" runat="server" ID="RadListBoxDestination" Width="230px" Height="200px" dir="rtl"
            AllowReorder="true" AllowDelete="True" ButtonSettings-Position="Left" ButtonSettings-AreaWidth="40px">
        </telerik:RadListBox>
    </div>
    </form>
</body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?