JavaScript/jQuery TreeView Events
This section describes events fired by this widget.
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
 
contentReady
Raised when the widget's content is ready.
Event
Information about the event.
| Name | Type | Description | 
|---|---|---|
| component | 
                         The widget's instance.  | 
                |
| element | 
                         The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.  | 
                |
| model | 
                         The model data. Available only when using Knockout.  | 
                
Main article: onContentReady.
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
 
disposing
Raised when the widget is removed from the DOM using the remove(), empty(), or html() jQuery methods only.
Event
Information about the event.
| Name | Type | Description | 
|---|---|---|
| component | 
                         The widget instance.  | 
                |
| element | 
                         The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.  | 
                |
| model | 
                         The model data. Available only if you use Knockout.  | 
                
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
 
initialized
Raised only once, after the widget is initialized.
Event
Information about the event.
| Name | Type | Description | 
|---|---|---|
| component | 
                         The widget's instance.  | 
                |
| element | 
                         The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.  | 
                
Main article: onInitialized
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
 
itemClick
Fires when a widget item is clicked.
Event
Information about the event.
| Name | Type | Description | 
|---|---|---|
| node | 
                         The item's node.  | 
                |
| model | 
                         The model data. Available only if Knockout is used.  | 
                |
| element | 
                         The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.  | 
                |
| component | 
                         The widget's instance.  | 
                
Instead, you can use the onItemClick option to handle the event.
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
 
itemCollapsed
Fires when a tree view item is collapsed.
Event
Information about the event.
| Name | Type | Description | 
|---|---|---|
| component | 
                         The widget's instance.  | 
                |
| element | 
                         The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.  | 
                |
| model | 
                         The model data. Available only if Knockout is used.  | 
                |
| itemData | 
                         The collapsed item's data.  | 
                |
| itemElement | 
                         The item's container. It is an HTML Element or a jQuery Element when you use jQuery.  | 
                |
| itemIndex | 
                         The item's index.  | 
                |
| jQueryEvent | 
                             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 | 
                         The item's node.  | 
                
Instead, you can use the onItemCollapsed option to handle the event.
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
 
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.
Event
Information about the event.
| Name | Type | Description | 
|---|---|---|
| node | 
                         The item's node.  | 
                |
| model | 
                         The model data. Available only if Knockout is used.  | 
                |
| element | 
                         The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.  | 
                |
| component | 
                         The widget's instance.  | 
                
Instead, you can use the onItemContextMenu option to handle the event.
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
 
itemExpanded
Fires when a tree view item is expanded.
Event
Information about the event.
| Name | Type | Description | 
|---|---|---|
| component | 
                         The widget's instance.  | 
                |
| element | 
                         The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.  | 
                |
| model | 
                         The model data. Available only if Knockout is used.  | 
                |
| itemData | 
                         The expanded item's data.  | 
                |
| itemElement | 
                         The item's container. It is an HTML Element or a jQuery Element when you use jQuery.  | 
                |
| itemIndex | 
                         The item's index.  | 
                |
| jQueryEvent | 
                             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 | 
                         The item's node.  | 
                
Instead, you can use the onItemExpanded option to handle the event.
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
 
itemHold
Fires when the widget's collection item is being held for the time period specified by the itemHoldTimeout option.
Event
Information about the event.
| Name | Type | Description | 
|---|---|---|
| node | 
                         The item node.  | 
                |
| model | 
                         The model data. Available only if Knockout is used.  | 
                |
| element | 
                         The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.  | 
                |
| component | 
                         The widget's instance.  | 
                
Instead, you can use the onItemHold option to handle the event.
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
 
itemRendered
Fires after a collection item is rendered.
Event
Information about the event.
| Name | Type | Description | 
|---|---|---|
| node | 
                         The item node.  | 
                |
| model | 
                         The model data. Available only if Knockout is used.  | 
                |
| element | 
                         The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.  | 
                |
| component | 
                         The widget's instance.  | 
                
Instead, you can use the onItemRendered option to handle the event.
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
 
itemSelected
Use the onItemSelectionChanged event instead.
Fires when a tree view item is selected.
Event
Information about the event.
| Name | Type | Description | 
|---|---|---|
| component | 
                         The widget's instance.  | 
                |
| element | 
                         The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.  | 
                |
| model | 
                         The model data. Available only if Knockout is used.  | 
                |
| itemElement | 
                         The selected item's container.  | 
                |
| node | 
                         The selected item's node.  | 
                
See Also
- Call Methods: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
 
itemSelectionChanged
Fires when a tree view item is selected.
Event
Information about the event.
| Name | Type | Description | 
|---|---|---|
| component | 
                         The widget's instance.  | 
                |
| element | 
                         The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.  | 
                |
| model | 
                         The model data. Available only if Knockout is used.  | 
                |
| node | 
                         The selected item's node.  | 
                |
| itemElement | 
                         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.
- The selectByClick option is set to true.
 - The showCheckBoxesMode option is not set to 'none'.
 - You use one of the methods: selectAll, unselectAll, selectItem, unselectItem.
 
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
 
optionChanged
Raised after a widget option is changed.
Event
Information about the event.
| Name | Type | Description | 
|---|---|---|
| name | 
                         The option's short name.  | 
                |
| model | 
                         The model data. Available only if you use Knockout.  | 
                |
| element | 
                         The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.  | 
                |
| component | 
                         The widget's instance.  | 
                |
| fullName | 
                         The option's full name.  | 
                |
| value | any | 
                         The option's new value.  | 
                
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
 
selectAllValueChanged
Raised after the "Select All" check box's state changes.
Event
Information about the event.
| Name | Type | Description | 
|---|---|---|
| component | 
                         The widget's instance.  | 
                |
| element | 
                         The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.  | 
                |
| model | 
                         The model data. Available only if Knockout is used.  | 
                |
| value | 
                         The "Select All" check box's new state.  | 
                
Main article: onSelectAllValueChanged
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
 
selectionChanged
Raised after selecting an item or clearing its selection.
Event
Information about the event.
| Name | Type | Description | 
|---|---|---|
| component | 
                         The widget's instance.  | 
                |
| element | 
                         The widget's container. It is an HTML Element or a jQuery Element when you use jQuery.  | 
                |
| model | 
                         The model data. Available only if Knockout is used.  | 
                
Main article: onSelectionChanged
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
 
If you have technical questions, please create a support ticket in the DevExpress Support Center.