Adding validation to a window causes the message to wrap

3 posts, 1 answers
  1. Shane P
    Shane P avatar
    86 posts
    Member since:
    Sep 2012

    Posted 01 Apr 2012 Link to this post

    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. Answer
    Dimo
    Admin
    Dimo avatar
    8332 posts

    Posted 02 Apr 2012 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Shane P
    Shane P avatar
    86 posts
    Member since:
    Sep 2012

    Posted 02 Apr 2012 Link to this post

    Cool thanks Dimo. Your suggestion did the trick for me
Back to Top