Tooltip and Validation

7 posts, 0 answers
  1. Paul Corbett
    Paul Corbett avatar
    19 posts
    Member since:
    Jan 2008

    Posted 16 Jan 2008 Link to this post

    Hi,

    first of all I like to state that I am very impressed with the controls like a lot of people using them I find them to be the best.

    Now to the matter in hand,

    I was wondering if there is a way to display the validation errors(messages) in a form a tooltip.
    Secondly if there is way the validationsummary can be added as a tooltip?

    Thank you very much
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 16 Jan 2008 Link to this post

    Hello Chris,

    Yes, it is possible to use a RadToolTip for displaying a ValidationSummary.  In order to achieve this you must go through the following steps:

    1. Add a ValidationSummary object to your RadToolTip.
    2. Write a javascript function to check the validity (the easiest way to do this is by checking the display of the ValidationSummary object - if it is "none", there are not invalid values) and cancel the RadToolTip pop-up if everything is correct.
    3. Initialize the "OnClientBeforeShow" property of the ToolTip with this function.

    A demonstration of this approach can be found  here

     Greetings,
    Svetlina
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Stephen
    Stephen avatar
    70 posts
    Member since:
    Mar 2008

    Posted 28 Apr 2009 Link to this post

    The link in the last post no longer seems to work, could you please provide an update link?


    Thanks,
    Stephen
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Apr 2009 Link to this post

    Hello Stephan,

    Check out the updated link below which demonstrates on using RadToolTip to enter data into controls and also for validation purposes:
    RadToolTip Client-side API

    Thanks
    Princy.
  6. Stephen
    Stephen avatar
    70 posts
    Member since:
    Mar 2008

    Posted 28 Apr 2009 Link to this post

    Thank you, this is exactly what I was looking for.
  7. John G
    John G avatar
    8 posts
    Member since:
    Jun 2012

    Posted 04 Dec 2009 Link to this post

    Is there anyway to highlight the fields with a red border as well as show the tooltip?
  8. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 09 Dec 2009 Link to this post

    Hello John G,

     Yes, you can achieve this by using standard javascript - in the OnClientShow event of the RadToolTip reference the textboxes and change their color, e.g as shown below:

    $get("TextBox1").style.borderColor = "Red";


    Regards,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017