radwindow right-to-left support issue

6 posts, 1 answers
  1. Malek
    Malek avatar
    20 posts
    Member since:
    Feb 2011

    Posted 26 Oct 2011 Link to this post

    Hello there,
    I'm using radwindow in my page in RTL mode, but it doesn't seem link it work!!
    it looks like in the attached image!!

    I set direction = rtl to the container of the radwindow as in you live demo but didn't work.
    did I miss anything to do?

    please help me
    thanks in advance
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 27 Oct 2011 Link to this post

    Hello Malek,

    You can add the following custom CSS.

    CSS:
    <style type="text/css">
    .windowcss
     {
       direction:rtl;
     
    </style>

    Thanks,
    Shinu.
  3. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4614 posts

    Posted 27 Oct 2011 Link to this post

    Hi guys,

    It is important to note that the RadWindow actually renders in the page root (i.e. as a direct child of the form element). This means that an rtl style set only to its container will not affect it properly, as it is not entirely rendered there.

    In the demo the description says " in order to turn on the RTL support you should set dir=rtl to the html or body elements". The RTL page itself is loaded in an iframe and has the direction="rtl" attribute applied to the html element (via CSS).


    Best wishes,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  4. Malek
    Malek avatar
    20 posts
    Member since:
    Feb 2011

    Posted 28 Oct 2011 Link to this post

    Thank you Marin for your help,
    your solution works good, but unfortunately I can't  set dir=rtl to the html or body elements, I must set the direction for each element separately, so is there any way to set the direction of the radwindow directly? (I prefer to be in code behind)..

    thank you
  5. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    4614 posts

    Posted 31 Oct 2011 Link to this post

    Hello Malek,

    In that case what I can advise is that you set up a CSS class for the controls you need with RTL layout, for example:
    .rtlClass
    {
        direction: rtl;
    }

    and then apply it to the RadWindow's popup element via its CssClass property (which can also be set in the code-behind):
    <telerik:RadWindow runat="server" ID="RadWindow1" CssClass="rtlClass" VisibleOnPageLoad="true">
        <ContentTemplate>
            <asp:Label ID="Label1" Text="some text with rtl layout" runat="server" />
        </ContentTemplate>
    </telerik:RadWindow>

    This results in the attached screenshot with me. I hope this is the expected behavior.

    Regards,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  6. Malek
    Malek avatar
    20 posts
    Member since:
    Feb 2011

    Posted 31 Oct 2011 Link to this post

    Thank you very much Marin, that's exactly what I wanted to do.
Back to Top