React TreeView 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

HTMLElement | jQuery

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

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

HTMLElement | jQuery

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

model

Object

The model data. Available only if you use Knockout.

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

HTMLElement | jQuery

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

Main article: onInitialized

See Also

itemClick

Fires when a widget item is clicked.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
node

TreeView Node

The item's node.

model

Object

The model data. Available only if Knockout is used.

element

HTMLElement | jQuery

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

component

Object

The widget's instance.

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

See Also

itemCollapsed

Fires when a tree view item is collapsed.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

Object

The widget's instance.

element

HTMLElement | jQuery

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

model

Object

The model data. Available only if Knockout is used.

itemData

Object

The collapsed item's data.

itemElement

HTMLElement | jQuery

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

itemIndex

Number

The item's index.

jQueryEvent

jQuery.Event

Use 'event' instead.

The jQuery event that caused the handler execution. Deprecated in favor of the event field.

event

Event (jQuery or EventObject)

The event that caused the handler execution. It is a dxEvent or a jQuery.Event when you use jQuery.

node

TreeView Node

The item's node.

Instead, you can use the onItemCollapsed 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

Information about the event.

Object structure:
Name Type Description
node

TreeView Node

The item's node.

model

Object

The model data. Available only if Knockout is used.

element

HTMLElement | jQuery

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

component

Object

The widget's instance.

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

See Also

itemExpanded

Fires when a tree view item is expanded.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

Object

The widget's instance.

element

HTMLElement | jQuery

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

model

Object

The model data. Available only if Knockout is used.

itemData

Object

The expanded item's data.

itemElement

HTMLElement | jQuery

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

itemIndex

Number

The item's index.

jQueryEvent

jQuery.Event

Use 'event' instead.

The jQuery event that caused the handler execution. Deprecated in favor of the event field.

event

Event (jQuery or EventObject)

The event that caused the handler execution. It is a dxEvent or a jQuery.Event when you use jQuery.

node

TreeView Node

The item's node.

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

See Also

itemHold

Fires when the widget's collection item is being held for the time period specified by the itemHoldTimeout option.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
node

TreeView Node

The item node.

model

Object

The model data. Available only if Knockout is used.

element

HTMLElement | jQuery

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

component

Object

The widget's instance.

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

See Also

itemRendered

Fires after a collection item is rendered.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
node

TreeView Node

The item node.

model

Object

The model data. Available only if Knockout is used.

element

HTMLElement | jQuery

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

component

Object

The widget's instance.

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

See Also

itemSelected Deprecated

Use the onItemSelectionChanged event instead.

Fires when a tree view item is selected.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

Object

The widget's instance.

element

HTMLElement | jQuery

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

model

Object

The model data. Available only if Knockout is used.

itemElement

HTMLElement | jQuery

The selected item's container.

node

TreeView Node

The selected item's node.

See Also

itemSelectionChanged

Fires when a tree view item is selected.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

Object

The widget's instance.

element

HTMLElement | jQuery

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

model

Object

The model data. Available only if Knockout is used.

node

TreeView Node

The selected item's node.

itemElement

HTMLElement | jQuery

The selected item's container.

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

This event fires in one of the following cases.

  1. The selectByClick option is set to true.
  2. The showCheckBoxesMode option is not set to 'none'.
  3. You use one of the methods: selectAll, unselectAll, selectItem, unselectItem.
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
name

String

The option's short name.

model

Object

The model data. Available only if you use Knockout.

element

HTMLElement | jQuery

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

component

Object

The widget's instance.

fullName

String

The option's full name.

value any

The option's new value.

See Also

selectAllValueChanged

Raised after the "Select All" check box's state changes.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

Object

The widget's instance.

element

HTMLElement | jQuery

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

model

Object

The model data. Available only if Knockout is used.

value

Boolean

The "Select All" check box's new state.

Main article: onSelectAllValueChanged

See Also

selectionChanged

Raised after selecting an item or clearing its selection.

Type:

Event

Function parameters:
e:

Object

Information about the event.

Object structure:
Name Type Description
component

Object

The widget's instance.

element

HTMLElement | jQuery

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

model

Object

The model data. Available only if Knockout is used.

Main article: onSelectionChanged

See Also