Events

This section describes events raised by the Draggable widget.

See Also

disposing

Raised before the widget is disposed of.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component Draggable

The widget instance.

element

Element (jQuery or HTML)

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

model

Object

Model data. Available only if you use Knockout.

Main article: onDisposing

See Also

dragEnd

Raised when drag gesture is finished.

Type:

Event

Function parameters:
e:

Object

Information about the event that caused the function's execution.

Object structure:
Name Type Description
cancel

Boolean

Allows you to cancel the gesture.

component Draggable

The widget that raised the event.

element

Element (jQuery or HTML)

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

event

Event (jQuery or dxEvent)

The event that caused the function to execute. It is a dxEvent or a jQuery.Event when you use jQuery.

fromComponent

Sortable

|

Draggable

The instance of the item's source widget.

fromData any

Custom data associated with the source widget.

itemData any

The dragged item's data.

itemElement

Element (jQuery or HTML)

The container of the item being dragged. It is an HTML Element or a jQuery Element when you use jQuery.

model

Object

Model data. Available only if you use Knockout.

toComponent

Sortable

|

Draggable

The instance of the item's target widget.

toData any

Custom data associated with the target widget.

dragMove

Raised every time a draggable item is moved.

Type:

Event

Function parameters:
e:

Object

Information about the event that caused the function's execution.

Object structure:
Name Type Description
cancel

Boolean

Allows you to cancel the gesture.

component Draggable

The widget that raised the event.

element

Element (jQuery or HTML)

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

event

Event (jQuery or dxEvent)

The event that caused the function to execute. It is a dxEvent or a jQuery.Event when you use jQuery.

fromComponent

Sortable

|

Draggable

The instance of the item's source widget.

fromData any

Custom data associated with the source widget.

itemData any

The dragged element's data.

itemElement

Element (jQuery or HTML)

The container of the item being dragged. It is an HTML Element or a jQuery Element when you use jQuery.

model

Object

Model data. Available only if you use Knockout.

toComponent

Sortable

|

Draggable

The instance of the item's target widget.

toData any

Custom data associated with the target widget.

dragStart

Raised when drag gesture is initialized.

Type:

Event

Function parameters:
e:

Object

Information about the event that caused the function's execution.

Object structure:
Name Type Description
cancel

Boolean

Allows you to cancel the gesture.

component Draggable

The widget that raised the event.

element

Element (jQuery or HTML)

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

event

Event (jQuery or dxEvent)

The event that caused the function to execute. It is a dxEvent or a jQuery.Event when you use jQuery.

fromData any

Custom data associated with the source widget.

itemData any

The dragged item's data.

itemElement

Element (jQuery or HTML)

The container of the item being dragged. It is an HTML Element or a jQuery Element when you use jQuery.

model

Object

Model data. Available only if you use Knockout.

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 Draggable

The widget's instance.

element

Element (jQuery or HTML)

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

Main article: onInitialized

See Also

optionChanged

Raised after a widget option is changed.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component Draggable

The widget's instance.

fullName

String

The path to the modified option that includes all parent options.

name

String

The modified option if it belongs to the first level. Otherwise, the first-level option it is nested into.

value any

The modified option's new value.

element

Element (jQuery or HTML)

The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.

model

Object

Model data. Available only if you use Knockout.

Main article: onOptionChanged

See Also