Skip to main content
Version: 4.1

ErrorProvider

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.1.0.0)

Provides a user interface for indicating that a control on a form has an error associated with it.

public class ErrorProvider : Component, IExtenderProvider, ISupportInitialize, IErrorProvider

Constructors

Instance member ErrorProvider()

Initializes a new instance of the ErrorProvider class and initializes the default settings for BlinkRate, BlinkStyle, and the Icon.

Instance member ErrorProvider(containerControl)

Initializes a new instance of the ErrorProvider class attached to a ContainerControl.

NameTypeDescription
containerControlContainerControlThe ContainerControl to monitor for errors.

Instance member ErrorProvider(container)

Initializes a new instance of the ErrorProvider class attached to an IContainer implementation.

NameTypeDescription
containerIContainerAn IContainer that represents the container of the ErrorProvider extender.

Properties

Instance member AllowHtml

Boolean: Returns or sets a value indicating that the control can display HTML in the ErrorMessage property. (Default: False)

Instance member BlinkAnimation

ErrorAnimationType: Returns or sets a value indicating the type of animation to perform when the error icon blinks.. (Default: Blink)

Instance member BlinkRate

Int32: Returns or sets the rate at which the error icon flashes. (Default: 250)

Throws:

Instance member BlinkStyle

ErrorBlinkStyle: Returns or sets a value indicating when the error icon flashes. (Default: BlinkIfDifferentError)

Instance member ContainerControl

ScrollableControl: Returns or sets the container ContainerControlthat provides the BindingContext for binding to the IDataErrorInfo interface implemented by a DataSource. (Default: null)

Instance member DataMember

String: Returns or sets the list within a data source to monitor for errors. (Default: "")

Instance member DataSource

Object: Returns or sets the data source that the ErrorProvider monitors for errors. (Default: null)

Instance member HasErrors

Boolean: Returns true when the error provider contains at least one error.

Instance member Icon

Image: Returns or sets the Image that is displayed next to a control when an error description string has been set for the control.

Throws:

Instance member IconAlignment

ErrorIconAlignment: Returns or sets the default ErrorIconAlignment. (Default: MiddleRight)

Instance member IconPadding

Int32: Returns or sets the default ErrorIconAlignment. (Default: 0)

Instance member IconSource

String: Returns or sets the source URL of the image that is displayed next to a control when an error description string has been set for the control.

Throws:

Instance member RightToLeft

Boolean: Returns or sets a value that indicates whether the component is used in a locale that supports right-to-left fonts. (Default: False)

Instance member Tag

Object: Returns or sets an object that contains data about the component. (Default: null)

Methods

Instance member BindToDataAndErrors(dataSource, dataMember)

Sets the DataSource and DataMember properties.

ParameterTypeDescription
dataSourceObjectA data set based on the IList interface to be monitored for errors.
dataMemberStringA collection within the dataSource to monitor for errors.

Instance member CanExtend(extendee)

Returns a value indicating whether a control can be extended.

ParameterTypeDescription
extendeeObjectThe control to be extended.

Returns: Boolean. true if the control can be extended; otherwise, false.This property will be true if the object is a Control and is not a Form or ToolBar.

Instance member Clear()

Clears all error providers.

Protected member Dispose(disposing)

Disposes the component and removes it from the design container.

ParameterTypeDescription
disposingBooleantrue when this method is called by the application rather than a finalizer.

Instance member GetError(control)

Returns the current error description string for the specified control.

ParameterTypeDescription
controlControlThe item to get the error description string for.

Returns: String. The error description string for the specified control.

Throws:

Instance member GetIconAlignment(control)

Returns a value indicating where the error icon should be placed in relation to the control.

ParameterTypeDescription
controlControlThe control to get the icon location for.

Returns: ErrorIconAlignment. One of the ErrorIconAlignment values. The default icon alignment is MiddleRight.

Throws:

Instance member GetIconPadding(control)

Returns the amount of extra space to leave next to the error icon.

ParameterTypeDescription
controlControlThe control to get the padding for.

Returns: Int32. The number of pixels to leave between the icon and the control.

Throws:

Protected member OnErrorChanged(e)

ParameterTypeDescription
eErrorProviderErrorChangedEventArgs

Protected member OnRightToLeftChanged(e)

Fires the RightToLeftChanged event.

ParameterTypeDescription
eEventArgsA EventArgs that contains the event data.

Protected member OnWebRender(config)

Renders the client component.

ParameterTypeDescription
configObjectDynamic configuration object.

Instance member SetError(control, value)

Sets the error description string for the specified control.

ParameterTypeDescription
controlControlThe control to set the error description string for.
valueStringThe error description string, or null or Empty to remove the error.

Throws:

Instance member SetIconAlignment(control, value)

Sets the location where the error icon should be placed in relation to the control.

ParameterTypeDescription
controlControlThe control to set the icon location for.
valueErrorIconAlignmentOne of the ErrorIconAlignment values.

Throws:

Instance member SetIconPadding(control, value)

Sets the amount of extra space to leave between the specified control and the error icon.

ParameterTypeDescription
controlControlThe control to set the padding for.
valueInt32The number of pixels to add between the icon and the control .

Throws:

Instance member UpdateBinding()

Updated the bindings.

Events

Instance member ErrorChanged

ErrorProviderErrorChangedHandler

Instance member RightToLeftChanged

EventHandler Fired when the RightToLeft property changes value.

Implements

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IErrorProviderExposes a common api implemented by components that can collect errors in relation to a Control.
IWisejComponentAll wisej components implement this interface.
IWisejSerializableAllows an object to serialize itself.