Configuration

An object defining configuration options for the widget.

hoverStateEnabled

A Boolean value specifying whether or not the widget changes its state when being hovered by an end user.

Type: Boolean
Default Value: false

items

An array of items displayed by the widget.

Type: Array

Generally, the array of items is auto-generated when a validation result is ready. And if you set a custom array of items, it will be overridden by the auto-generated array. So use this option to read the current array of items. Alternatively, you can set the array of items generated by a custom validation engine.

itemTemplate

The template to be used for rendering items.

Type: template
Function parameters:
itemData: Object

The item object to be rendered.

itemIndex: Number

The index of the item to be rendered.

itemElement: jQuery

An HTML element of the item to be rendered.

Return Value: String|DOM Node|jQuery

A template name or a template container.

Default Value: 'item'

A binding context of an item template is the data source object that corresponds to the currently rendered item.

In Knockout approach, you can bind template elements to the item object's fields directly. To access another binding context within an item template, use Knockout binding variables.

In AngularJS Approach, if you need to access item object's fields within a template, use a variable whose name is assigned to the dx-item-alias directive. Add the directive to the widget element to specify an alias to the root object of an item. Without this directive, item object fields are beyond reach. To access another binding context within an item template, use AngularJS binding variables.

See Also

onContentReady

A handler for the contentReady event.

Type: function
Function parameters:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget instance.

element: jQuery

An HTML element of the widget.

model: Object

Provides access to the data that is available for binding against the element. Available only in the Knockout approach.

Default Value: null

Assign a function to perform a custom action when widget content is ready.

onDisposing

A handler for the disposing event.

Type: function
Function parameters:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget instance.

element: jQuery

An HTML element of the widget.

model: Object

Provides access to the data that is available for binding against the element. Available only in the Knockout approach.

Default Value: null

Assign a function to perform a custom action when the widget is being removed.

NOTE
The function assigned to this option is executed only if the widget is removed using the remove(), empty(), or html() jQuery methods.

onInitialized

A handler for the initialized event.

Type: function
Function parameters:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget instance.

element: jQuery

An HTML element of the widget.

Default Value: null

Assign a function to perform a custom action when the widget is initialized.

onItemClick

A handler for the itemClick event.

Function parameters:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget instance.

element: jQuery

An HTML element of the widget.

model: Object

Provides access to the data that is available for binding against the element. Available only in the Knockout approach.

itemData: Object

The data that is bound to the clicked item.

itemElement: jQuery

An HTML element of the item.

itemIndex: Number

Specifies the index of the clicked item.

jQueryEvent: jQuery.Event

Specifies the jQuery event that caused action execution.

Default Value: null

Assign a function to perform a custom action when a widget item is clicked.

To navigate to a specific URL when the itemClick event fires, assign that URL or the anchor part (#) of that URL directly to this option as a string.

onOptionChanged

A handler for the optionChanged event.

Type: function
Function parameters:

Provides function parameters.

Object structure:
component: Object

Provides access to the widget instance.

name: String

Specifies the name of the option whose value is changed.

fullName: String

Specifies a full name of the option whose value is changed. The full name is formed by concatenating the names of the options that are presented in the hierarchy of the given option. The names are delimited by commas.

value: any

Specifies a new value for the option.

element: jQuery

An HTML element of the widget.

model: Object

Provides access to the data that is available for binding against the element. Available only in the Knockout approach.

Default Value: null

Assign a function to perform a custom action after an option of the component is changed.

validationGroup

Specifies the validation group for which summary should be generated.

Type: String

In the Knockout approach, the ValidationSummary widget should be added to the div element representing the ValidationGroup component. In this instance, you do not have to specify the validationGroup option for the ValidationSummary widget.

If you use the JQuery approach, the validationGroup option should be specified for the ValidationSummary widget to generate a summary for a particular validation group. Assign the validation group name that is specified for the validationGroup option of the validators that extend the editors to be validated.