ErrorProvider or help tips

Thread is closed for posting
2 posts, 0 answers
  1. Todd Gill
    Todd Gill avatar
    5 posts
    Member since:
    Feb 2006

    Posted 20 Feb 2007 Link to this post

    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
  2. Boyko Markov
    Boyko Markov avatar
    610 posts

    Posted 21 Feb 2007 Link to this post

    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"); 

    the telerik team
Back to Top