Events

This section describes events fired by this widget.

See Also

contentReady

Raised when the widget's content is ready.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

Object

The widget's instance.

element

jQuery

The widget's container.

model

Object

The model data. Available only when using Knockout.

Main article: onContentReady.

See Also

disposing

Raised when the widget is removed from the DOM using the remove(), empty(), or html() jQuery methods only.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

Object

The widget instance.

element

jQuery

The widget's container.

model

Object

The model data. Available only if you use Knockout.

Main article: onDisposing

See Also

hidden

Fires when the context menu is hidden.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
component

Object

Provides access to the widget's 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.

Instead, you can use the onHidden option to handle the event.

See Also

hiding

Fires before the context menu is hidden.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
component

Object

Provides access to the widget's 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.

cancel

Boolean

Specifies whether or not to cancel the hiding of the widget.

Instead, you can use the onHiding option to handle the event.

See Also

initialized

Raised only once, after the widget is initialized.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

Object

The widget's instance.

element

jQuery

The widget's container.

Main article: onInitialized

See Also

itemClick

Fires when a widget item is clicked.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
component

Object

Provides access to the widget's 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.

Instead, you can use the onItemClick option to handle the event.

See Also

itemContextMenu

Fires when the right mouse button is clicked when the pointer is over a widget item, or when the "sustained" (also known as a long press) touch action is performed.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
component

Object

Provides access to the widget's 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 item.

itemElement

jQuery

An HTML element of the item.

itemIndex

Number

Specifies the index of the item.

jQueryEvent

jQuery.Event

Specifies the jQuery event that caused action execution.

Instead, you can use the onItemContextMenu option to handle the event.

See Also

itemRendered

Fires after a collection item is rendered.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
component

Object

Provides access to the widget's 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 item to be rendered.

itemElement

jQuery

An HTML element of the item.

itemIndex

Number

Specifies the index of the rendered item.

Instead, you can use the onItemRendered option to handle the event.

See Also

optionChanged

Raised after an option of the widget is changed.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

Object

The widget's instance.

name

String

A short name of the option whose value has been changed.

fullName

String

A full name of the option whose value has been changed; contains a full hierarchy of the option.

value any

A new value for the option.

element

jQuery

The widget's container.

model

Object

The model data. Available only if you use Knockout.

Main article: onOptionChanged

See Also

positioning

Fires before the context menu is positioned.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
component

Object

Provides access to the widget's 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.

jQueryEvent

jQuery.Event

Returns a jQuery event that caused the event.

position position

An object that holds context menu positioning options.

Instead, you can use the onPositioning option to handle the event.

See Also

selectionChanged

Fires after a collection item is selected or unselected.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
component

Object

Provides access to the widget's 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.

addedItems

Array

An array of items added to selection.

removedItems

Array

An array of items removed from selection.

Main article: onSelectionChanged

See Also

showing

Fires before the context menu is displayed.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
component

Object

Provides access to the widget's 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.

cancel

Boolean

Specifies whether or not to cancel the showing of the widget.

Instead, you can use the onShowing option to handle the event.

See Also

shown

Fires when the context menu is displayed.

Type:

Event

Function parameters:
e:

Object

Provides function parameters.

Object structure:
Name Type Description
component

Object

Provides access to the widget's 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.

Instead, you can use the onShown option to handle the event.

See Also