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

Tooltip and Validation

6 Answers 276 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Paul Corbett
Top achievements
Rank 1
Paul Corbett asked on 16 Jan 2008, 09:44 AM
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

6 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 16 Jan 2008, 12:39 PM
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
0
Stephen
Top achievements
Rank 1
answered on 28 Apr 2009, 05:28 AM
The link in the last post no longer seems to work, could you please provide an update link?


Thanks,
Stephen
0
Princy
Top achievements
Rank 2
answered on 28 Apr 2009, 07:01 AM
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.
0
Stephen
Top achievements
Rank 1
answered on 28 Apr 2009, 07:04 AM
Thank you, this is exactly what I was looking for.
0
John G
Top achievements
Rank 1
answered on 04 Dec 2009, 09:17 PM
Is there anyway to highlight the fields with a red border as well as show the tooltip?
0
Svetlina Anati
Telerik team
answered on 09 Dec 2009, 12:44 PM
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.
Tags
ToolTip
Asked by
Paul Corbett
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Stephen
Top achievements
Rank 1
Princy
Top achievements
Rank 2
John G
Top achievements
Rank 1
Share this question
or