Class RadValidationProvider
Provides a validation management for RadEditorControl descendant editors.
Inheritance
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[TelerikToolboxCategory("Editors")]
public class RadValidationProvider : Component, ISupportInitialize, IExtenderProvider
Constructors
RadValidationProvider()
Initializes a new instance of the RadValidationProvider class.
Declaration
public RadValidationProvider()
RadValidationProvider(IContainer)
Initializes a new instance of the RadValidationProvider class with the specified container control.
Declaration
public RadValidationProvider(IContainer container)
Parameters
System. An object that implements the System. |
Properties
AssociatedControls
Gets the collection of the controls whose values are validated.
Declaration
public List<RadEditorControl> AssociatedControls { get; }
Property Value
System.
|
ValidationMode
Gets or Sets the ValidationMode.
Declaration
public ValidationMode ValidationMode { get; set; }
Property Value
ValidationRules
Gets or Sets the collection of ValidationRules that belongs to this RadValidationProvider.
Declaration
public FilterDescriptorCollection ValidationRules { get; set; }
Property Value
Methods
BeginInit()
Declaration
public void BeginInit()
CanExtend(Object)
Indicates whether a control can be extended.
Declaration
public bool CanExtend(object extendee)
Parameters
System. The control to be extended. |
Returns
System. true if the control can be extended otherwise false. |
ClearErrorStatus()
Clear the visual indication for the validation error.
Declaration
public virtual void ClearErrorStatus()
ClearErrorStatus(RadControl)
Clear the visual indication for the validation error.
Declaration
public virtual void ClearErrorStatus(RadControl associatedControl)
Parameters
Rad A RadEditorControl descendant |
EndInit()
Declaration
public void EndInit()
FireValidationEvent(Boolean, RadControl, IRadValidationRule)
Declaration
protected virtual RadValidationEventArgs FireValidationEvent(bool isNotValid, RadControl associatedControl, IRadValidationRule rule)
Parameters
System.
|
Rad
|
IRad
|
Returns
GetIconAlignment(RadEditorControl)
Get the alignment of an error icon for the specified RadEditorControl.
Declaration
public ErrorIconAlignment GetIconAlignment(RadEditorControl control)
Parameters
Rad A target control. |
Returns
System. An System. |
GetIconPadding(RadEditorControl)
Returns the amount of extra space to leave next to the error icon.
Declaration
public Padding GetIconPadding(RadEditorControl control)
Parameters
Rad The control to get the padding for. |
Returns
System. The padding to leave between the icon and the control. |
GetValidationRule(RadEditorControl)
Returns a validation rule associated with the specified RadEditorControl descendant.
Declaration
public FilterDescriptor GetValidationRule(RadEditorControl control)
Parameters
Rad A RadEditorControl descendant. |
Returns
Filter A RadValidationRule descendant that represents the validation rule associated with the editor. Null if no validation rule is associated with the specified control. |
OnControlValidation(RadValidationEventArgs)
Declaration
protected virtual void OnControlValidation(RadValidationEventArgs e)
Parameters
RemoveControlFromRules(RadEditorControl)
Remove a specific RadEditorControl from the validation rules.
Declaration
public void RemoveControlFromRules(RadEditorControl editorControl)
Parameters
Rad A RadEditorControl descendant. |
RemoveRules(RadEditorControl)
Removes a rules associated with the control.
Declaration
public void RemoveRules(RadEditorControl control)
Parameters
Rad A RadEditorControl descendant |
RemoveValidationRule(RadEditorControl, IRadValidationRule)
Remove a validation rule associated with the specified RadEditorControl descendant.
Declaration
public void RemoveValidationRule(RadEditorControl editorControl, IRadValidationRule ruleToRemove)
Parameters
Rad A RadEditorControl descendant. |
IRad Rule to remove. |
SetIconAlignment(RadEditorControl, ErrorIconAlignment)
Sets the alignment of an error icon for the specified control.
Declaration
public void SetIconAlignment(RadEditorControl control, ErrorIconAlignment errorIconAlignment)
Parameters
Rad A target RadEditorControl. |
System. An System. |
SetIconPadding(RadEditorControl, Padding)
Sets the amount of extra space to leave between the specified control and the error icon.
Declaration
public void SetIconPadding(RadEditorControl control, Padding errorIconPadding)
Parameters
Rad The |
System. The padding to add between the icon and the |
SetValidationRule(RadEditorControl, FilterDescriptor)
Associates a validation rule with the specified RadEditorControl descendant.
Declaration
public void SetValidationRule(RadEditorControl control, FilterDescriptor rule)
Parameters
Rad A RadEditorControl descendant that represents the editor. |
Filter A RadValidationRule descendant that represents the validation rule. |
ShowToolTip(RadControl, String, String, Int32, Int32, Int32, Boolean)
Declaration
protected virtual void ShowToolTip(RadControl associatedControl, string toolTipText, string toolTipTitle, int toolTipX, int toolTipY, int toolTipDuration, bool enableToolTipShadow)
Parameters
Rad
|
System.
|
System.
|
System.
|
System.
|
System.
|
System.
|
Validate(RadEditorControl)
Validates the specified editor associated with the RadEditorControl.
Declaration
public bool Validate(RadEditorControl control)
Parameters
Rad A RadEditorControl or descendant that represents the editor to be validated. |
Returns
System. true if the editor has been successfully validated; otherwise false. |
Events
ControlValidation
Occurs before a RadEditorControl is being validated.
Declaration
public event RadValidationEventHandler ControlValidation
Event Type
ValidationModeChanged
Occurs when the ValidionMode property changed.
Declaration
public event EventHandler ValidationModeChanged
Event Type
System.
|