<br/> in RadAlert causes left&right border to disappear

5 posts, 0 answers
  1. JP
    JP avatar
    120 posts
    Member since:
    Aug 2011

    Posted 01 Nov 2012 Link to this post

    Hi,

    I'm using a RadAlert to display a text like this: "Test <br/> Test <br/>". The line breaks cause the left and right border of the window to disappear. This is only the case when using the RadAlert server-side.
    windowManager.RadAlert("Test <br/> Test <br/> Test", null, null, "Title", string.Empty);

    This will work:
    windowManager.RadAlert("Test Test Test", null, null, "Title", string.Empty);


    Using this text client-side doesn't cause any problems (but the generated code differs from the server-side radalert - there is an additional div around the message).
    windowManager.radalert("Test <br/> Test <br/> Test", null, null, "Title");

    How can I add line breaks server-side without having any layout problems?
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 02 Nov 2012 Link to this post

    Hello JP,

    I just tested this and it appears to be working fine with me. I am attaching here my sample along with a flash video from my experiment. Am I missing something? Is your setup different or does the behavior occur only under a certain browser? Could you compare it with your actual page and try to find the difference that is causing the problem? If you still cannot resolve this could you post here the changes I need to make in my page in order to observe the problem so that I can inspect it and provide a more accurate suggestion?


    Regards,
    Marin Bratanov
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. JP
    JP avatar
    120 posts
    Member since:
    Aug 2011

    Posted 02 Nov 2012 Link to this post

    Thanks for your response.

    I must admit that I never tested using the posted text because I thought the "<br/>" would be responsible for the missing borders.
    But I just tested with the posted text and it works fine for me too. But here is text which produces this error:
    "Test: <br/>Tile_250x230_HelpDesk_Cleaning_de.png" ("Test: Tile_250x230_HelpDesk_Cleaning_de.png" produces this error too).

    Somehow the filename is responsible. If I change the text to "Test: <br/>Tile_250x230_Test_de.png"  it works fine again... Why is just this specific text problematic?

    Thanks for your help!

  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 05 Nov 2012 Link to this post

    Hello JP,

    This is a different case than using HTML line break symbols. What happens is that the word you have is too long for its container, so its width is not sufficient to contain it. This causes the browser to resize the div that holds the text which in turn breaks the RadWindow layout.

    We cannot control this internally as we do not have control over your content, but I can offer two ways for you to avoid it:
    1. give the  dialog more width so it can accommodate your texts. This may not always be possible, yet it is a way
    2. use the word-wrap CSS property to make the words obey the container length:
    .rwDialogText
    {
         word-wrap: break-word;
    }


    Kind regards,
    Marin Bratanov
    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. Vasanthan
    Vasanthan avatar
    1 posts
    Member since:
    Oct 2012

    Posted 27 Jun 2013 Link to this post

    need To Give width and Hight that will appear on the screen dont give null
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017