Right-to-left Support
The RadButton fully supports right-to-left (RTL) language locales. The RadButtons are created and added to the page as children of the body element and in order to turn on the RTL support you should set dir=rtl to the html or body elements or set the direction:rtl css property as well.
<%@ Page Language="C#" AutoEventWireup="true" %><%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %><%@ 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" %><!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></title> <qsf:HeadTag ID="Headtag1" runat="server" /> <style type="text/css"> .yesNoHovered .rbText { color: White !important; } .imgBtnTable td { border-bottom: 1px solid #eee; padding: 5px; } .imgBtnTable td.center { text-align: right; border-right: 1px solid #eee; width: 200px; } </style></head><body class="BODY"> <form id="form1" runat="server"> <qsf:Header ID="Header1" runat="server" NavigationLanguage="c#" ShowSkinChooser="false" /> <telerik:RadScriptManager ID="ScriptManager1" runat="server" /> <div dir="rtl"> <table cellpadding="0" cellspacing="0" width="100%" class="imgBtnTable"> <tr> <td class="center"> <telerik:RadButton ID="btnVolume" runat="server" ButtonType="StandardButton" Width="100px" AutoPostBack="false" Text="תקן כפתור"> <Icon SecondaryIconCssClass="rbUpload" SecondaryIconRight="10" SecondaryIconTop="3" /> </telerik:RadButton> </td> <td> ."This is a standard button with a right positioned built-in icon SecondaryIconCssClass="rbSave <br /> Use the <strong>SecondaryIconCssClass</strong> property to show the icon of RadButton on the right side </td> </tr> <tr> <td> <telerik:RadButton ID="RadButton1" runat="server" ButtonType="LinkButton" AutoPostBack="false" Text="ذخیره"> <Icon SecondaryIconCssClass="rbSave" /> </telerik:RadButton> </td> <td> ".This is a link button with a right positioned built-in icon SecondaryIconCssClass="rbSave </td> </tr> <tr> <td class="center"> <telerik:RadButton ID="RadioButton1" runat="server" ButtonType="ToggleButton" ToggleType="Radio" AutoPostBack="false" GroupName="Radio" Text="Radio Button 1"> </telerik:RadButton><br /> <telerik:RadButton ID="RadioButton2" runat="server" ButtonType="ToggleButton" ToggleType="Radio" AutoPostBack="false" GroupName="Radio" Text="Radio Button 2" Checked="true"> </telerik:RadButton><br /> <telerik:RadButton ID="RadioButton3" runat="server" ButtonType="ToggleButton" ToggleType="Radio" AutoPostBack="false" GroupName="Radio" Text="Radio Button 3"> </telerik:RadButton> </td> <td> .Radio buttons in Right-to-Left parent <br /> The RadButton control automatically moves the icons to the right </td> </tr> <tr> <td class="center"> <telerik:RadButton ID="RadButton2" runat="server" ButtonType="ToggleButton" ToggleType="CheckBox" AutoPostBack="false" Text="CheckBox 1"> </telerik:RadButton><br /> <telerik:RadButton ID="RadButton3" runat="server" ButtonType="ToggleButton" ToggleType="CheckBox" AutoPostBack="false" Text="CheckBox 2" Checked="true"> </telerik:RadButton><br /> <telerik:RadButton ID="RadButton4" runat="server" ButtonType="ToggleButton" ToggleType="CheckBox" AutoPostBack="false" Text="CheckBox 3"> </telerik:RadButton> </td> <td> .CheckBoxes in Right-to-Left parent <br /> Similarly as the Radio buttons, the CheckBox icons are automatically moved to the right </td> </tr> <tr> <td class="center"> <telerik:RadButton ID="CheckBox1" runat="server" ButtonType="StandardButton" ToggleType="CheckBox" Checked="true" AutoPostBack="false" BorderWidth="0" BackColor="transparent" Text="CheckBox 1"> <ToggleStates> <telerik:RadButtonToggleState Text="Checked" SecondaryIconCssClass="rbToggleCheckboxChecked" /> <telerik:RadButtonToggleState Text="UnChecked" SecondaryIconCssClass="rbToggleCheckbox" /> </ToggleStates> </telerik:RadButton> <div style="padding-bottom: 5px;"> </div> <telerik:RadButton ID="CheckBox" runat="server" ButtonType="StandardButton" ToggleType="CheckBox" AutoPostBack="false" BorderWidth="0" BackColor="transparent" Text="CheckBox 2"> <ToggleStates> <telerik:RadButtonToggleState Text="Checked" SecondaryIconCssClass="rbToggleCheckboxChecked" /> <telerik:RadButtonToggleState Text="UnChecked" SecondaryIconCssClass="rbToggleCheckbox" /> </ToggleStates> </telerik:RadButton> <div style="padding-bottom: 5px;"> </div> <telerik:RadButton ID="CheckBox3" runat="server" ButtonType="StandardButton" ToggleType="CheckBox" Checked="true" AutoPostBack="false" BorderWidth="0" BackColor="transparent" Text="CheckBox 3"> <ToggleStates> <telerik:RadButtonToggleState Text="Checked" SecondaryIconCssClass="rbToggleCheckboxChecked" /> <telerik:RadButtonToggleState Text="UnChecked" SecondaryIconCssClass="rbToggleCheckbox" /> </ToggleStates> </telerik:RadButton> </td> <td> The user can easily customize her/his Radios or CheckBoxes using the Icon functionality of the RadButton control. These RadButton controls have their SecondaryIconCssClass properties, set to the CSS classes for the CheckBox icon </td> </tr> <tr> <td class="center"> <telerik:RadButton ID="BuiltinIconsButton2" runat="server" ButtonType="StandardButton" ToggleType="CustomToggle" AutoPostBack="false"> <ToggleStates> <telerik:RadButtonToggleState SecondaryIconCssClass="rbOk" Text="موافق" /> <telerik:RadButtonToggleState SecondaryIconCssClass="rbCancel" Text="إلغاء" /> </ToggleStates> </telerik:RadButton> </td> <td> .This demo shows how to render a CustomToggle button with embedded icons placed on the right side of the control </td> </tr> </table> </div> <qsf:Footer runat="server" ID="Footer1" /> </form></body></html>
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.