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

ErrorProvider or help tips

1 Answer 273 Views
Toolstrip (obsolete as of Q3 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Todd Gill
Top achievements
Rank 1
Todd Gill asked on 20 Feb 2007, 09:03 PM
How do I show the user entered in invalid data into a Telerik.WinControls.UI.RadTextBoxElement and other rad controls. It appears I can't use an ErrorProvider because the controls don't inherit from Windows.Forms.Control

1 Answer, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 21 Feb 2007, 08:35 AM
Hello Todd,

The ErrorProvider component uses a method named SetError to set an error to a control. SetError's parameters are of type control and string. Our controls are build as an aggregation of RadElements i.e RadTextBoxElement is only a part of the RadTextBox control. To use the ErrorProvider component you will have to put an instance of RadTextBox as a parameter of the SetError method instead of RadTextBoxElement because only RadTextBox inherits from System.Windows.Forms.Control. You can do the following to show the user entered an invalid data into a RadTextBox:

1) Drag&Drop a new instance of RadTextBox

2) Drag&Drop a new ErrorProvider component

3) Set error to the error provider

To set an error to the error provider you can write:

this.errorProvider1.SetError( this.radTextBox1, "Error Message"); 

Regards,
Ray
the telerik team
Tags
Toolstrip (obsolete as of Q3 2010)
Asked by
Todd Gill
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
Share this question
or