Methods

This section describes members used to manipulate the widget.

element()

Gets the root element of the widget.

Return Value: jQuery
The root element of the widget.
See Also

instance()

Returns this widget's instance. Use it to access other methods of the widget.

Return Value: Object
This widget's instance.
See Also

off(eventName)

Detaches all event handlers from the specified event.

Parameters:
eventName: String
The name of the event to unsubscribe from.
Return Value: Object
The object for which this method is called.
See Also

off(eventName, eventHandler)

Detaches a particular event handler from the specified event.

Parameters:
eventName: String
The name of the event to unsubscribe from.
eventHandler: function
The handler to be detached from the specified event.
Return Value: Object
The object for which this method is called.
See Also

on(eventName, eventHandler)

Subscribes to a specified event.

Parameters:
eventName: String
The name of the event to be subscribed.
eventHandler: function
An event handler for the specified event.
Return Value: Object
The object for which this method is called.

Use this method to subscribe to one of the events listed in the Events section.

See Also

on(events)

Subscribes to the specified events.

Parameters:
events: Object
An object of the following structure: { "eventName1": handler1, "eventName2": handler2, ...}
Return Value: Object
The object for which this method is called.

Use this method to subscribe to several events with one method call. Available events are listed in the Events section.

See Also

option()

Gets the widget's options.

Return Value: Object
The widget's options.
See Also

option(optionName)

Gets a specific option value.

Parameters:
optionName: String
The option name or the full path to the option.
Return Value: any
This option value.
See Also

option(optionName, optionValue)

Assigns a new value to a specific option.

Parameters:
optionName: String
The option name or the full path to the option.
optionValue: any
A new value for this option.
See Also

option(options)

Sets one or more options.

Parameters:
options: Object
The options along with their new values.
See Also

reset()

Resets the value and validation result of the editors that are included to the current validation group.

This method calls the reset method of each Validator object included to the current validation group.

validate()

Validates rules of the validators that belong to the current validation group.

Return Value: Object
An object defining the result of validating the current group.

The object returned by the validate() function has the following structure.

  • isValid
    Indicates whether all the rules checked for the current group are satisfied.
  • brokenRules
    An array of broken rules. The structure of rule objects is described in the validation Rules section.
  • validators
    An array of Validator widgets that are included in the validated group.

As an alternative to this method, you can use the DevExpress.validationEngine.validateGroup(group) function passing the current group as a parameter.