JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Using the ErrorProvider Class

The ErrorProvider class gives you a user interface when you want to indicate that there's an error associated with a control in a form; an icon will appear next to the control and an error message in the icon's tool tip. Here is the inheritance hierarchy for this class:

Object
   MarshalByRefObject
      Component
         ErrorProvider

You can find the more notable public properties of ErrorProvider objects in Table 21.11, and their more notable methods in Table 21.12. (This class has no non-inherited events.)

Table 21.11: Noteworthy public properties of ErrorProvider objects.

Property

Means

BlinkRate

Gets/sets the error icon blink rate.

BlinkStyle

Gets/sets if the error icon flashes.

ContainerControl

Gets/sets the parent control for this error provider.

DataMember

Gets/sets the data table to watch.

DataSource

Gets/sets dataset to watch.

Icon

Gets/sets the icon to be displayed next to a control when you've assigned a non-empty string to the error provider.

Table 21.12: Noteworthy public methods of ErrorProvider objects.

Method

Means

BindToDataAndErrors

Sets both the DataSource and DataMember properties at run time.

GetError

Returns the error description string.

GetIconAlignment

Gets the position of the error icon with respect to the control.

GetIconPadding

Gets the space to leave next to the icon.

SetError

Sets the error text.

SetIconAlignment

Sets the position of the error icon with respect to the control.

SetIconPadding

Sets the space to leave next to the icon.

UpdateBinding

Lets you update the data bindings and the text in the error provider.

Previous Section Next Section




JavaScript Editor Free JavaScript Editor     JavaScript Editor