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

Adding validation to a window causes the message to wrap

2 Answers 170 Views
Validation
This is a migrated thread and some comments may be shown as answers.
Shane P
Top achievements
Rank 1
Shane P asked on 01 Apr 2012, 09:20 AM
I am using a kendo window to input information and I am also trying to use the validation.

The validation message gets wrapped. Is it possible to extend the validation message so it overflows the windows border? I really would like it to stay on a single line without the wrapping.

Any suggestions would be appreciated.

Thank you  

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 02 Apr 2012, 04:23 PM
Hi Shane,

Theoretically, you can make this happen, however, some tweaks are required:

1. The Window is by default scrollable. You must disable this behavior by using

#myWindowID
{
        overflow:visible;
}

2. The validation message is not a tooltip (although it reuses some of the tooltip's styles). It is part of the page's so called "normal flow". You need to make it an absolutely positioned element via CSS.

#myWindowID span.k-invalid-msg
{
      position:absolute;
      white-space: nowrap;
}

Note that the white-space:nowrap style should not be needed, as the validation messages have it applied by default. I am not sure why this does not work in your case, maybe something else overrides the style.

3. Some top and left styles might also be needed to position the validation message according to your preferences.

All the best,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Shane P
Top achievements
Rank 1
answered on 02 Apr 2012, 08:45 PM
Cool thanks Dimo. Your suggestion did the trick for me
Tags
Validation
Asked by
Shane P
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Shane P
Top achievements
Rank 1
Share this question
or