This is a migrated thread and some comments may be shown as answers.

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

4 Answers 68 Views
Window
This is a migrated thread and some comments may be shown as answers.
JP
Top achievements
Rank 1
JP asked on 01 Nov 2012, 05:04 PM
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?

4 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 02 Nov 2012, 11:24 AM
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.
0
JP
Top achievements
Rank 1
answered on 02 Nov 2012, 11:57 AM
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!

0
Marin Bratanov
Telerik team
answered on 05 Nov 2012, 05:23 PM
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.
0
Vasanthan
Top achievements
Rank 1
answered on 27 Jun 2013, 07:44 AM
need To Give width and Hight that will appear on the screen dont give null
Tags
Window
Asked by
JP
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
JP
Top achievements
Rank 1
Vasanthan
Top achievements
Rank 1
Share this question
or