JavaScript/jQuery TreeMap Events
click
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 you use Knockout. |
|
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 clicked node; described in the Node section. |
When implementing a handling function, use the object passed to it as the parameter. Among the fields of this object, you can find the clicked node. To learn about node's members that you can use, refer to the description of the Node object.
To handle this event, attach a handler to it using the on(eventName, eventHandler) method. For example, the handler in the following code selects/deselects the clicked node.
// ... var selectNode = function (e) { e.node.select(!e.node.isSelected()); }; treeMapInstance.on('click', selectNode);
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
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. |
drawn
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 you use Knockout. |
drill
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 you use Knockout. |
|
node |
The Node object. |
When implementing a handling function, use the object passed to it as the parameter. Among the fields of this object, you can find the currently displayed node. To learn about node's members that you can use, refer to the description of the Node object.
The drill event can be used to enable/disable other widgets bound to TreeMap. For example, consider that you have a Button. A click on it drills the TreeMap widget one level up from the current node. But when the root node becomes the current, there is nowhere to drill up. In that case, disable the button in the handler of the drill event.
// ... var disableBackButton = function (e) { if (!e.node.getParent()) // checks whether the node has a parent; if it doesn't, it is the root node buttonInstance.option('disabled', true); else buttonInstance.option('disabled', false); }; treeMapInstance.on('drill', disableBackButton);
Although not provided out-of-the-box, the drill down capability is easy to implement using the API methods. Learn how to do this from the drillDown() method description.
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
exported
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 you use Knockout. |
exporting
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 you use Knockout. |
|
fileName |
The name of the file to which the widget is about to be exported. |
|
cancel |
Allows you to prevent exporting. |
|
format |
The resulting file format. One of PNG, PDF, JPEG, SVG and GIF. |
fileSaving
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. |
|
fileName |
The name of the file to be saved. |
|
format |
The format of the file to be saved. |
|
data |
Exported data as a BLOB. |
|
cancel |
Allows you to prevent file saving. |
hoverChanged
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 you use Knockout. |
|
node |
The node whose hover state has been changed; described in the Node section. |
When implementing a handling function, use the object passed to it as its parameter. Among the fields of this object, you can find the node whose hover state has been changed.
To identify whether the node was hovered over or hovered out, call its isHovered() method. To identify whether the node is a single tile or a group of tiles, call its isLeaf() method. Other accessible fields and methods of a node are described in the Node section.
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
incidentOccurred
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 you use Knockout. |
|
target | any |
Information on the occurred incident. |
Main article: onIncidentOccurred
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
initialized
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
nodesInitialized
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 you use Knockout. |
|
root |
The root node; described in the Node section. |
Implement a handler for this event to perform certain operations on the node structure. It will be called once - at the beginning of the widget's lifetime.
Within the handler, use the object passed to it as the parameter. Among the fields of this object, you can find the root node. Using the getAllChildren() and getChild(index) of this node, you can access any other node in the widget. To learn about other available members of any node including the root node, refer to the description of the Node object.
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
nodesRendering
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 you use Knockout. |
|
node |
In most cases, the root node. When drilling down, the node of the highest displayed level. |
Implement a handler for this event to customize nodes before they will be displayed. This handler will be called each time the collection of active nodes is changed.
Within the handler, you can use the object passed to it as the parameter. Among the fields of this object, you can find the currently displayed node. Using the getAllNodes(), getAllChildren(), getChild(index) and getParent() of this node, you can access any other node in the widget. To learn about other available members of any node, refer to the description of the Node object.
See Also
- Handle Events: jQuery | Angular | AngularJS | Knockout | ASP.NET MVC
optionChanged
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. |
selectionChanged
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 you use Knockout. |
|
node |
The node whose selection state has been changed; described in the Node section. |
When implementing a handling function, use the object passed to it as its parameter. Among the fields of this object, you can find the node whose selection state has been changed.
To identify whether the node was selected or deselected, call its isSelected() method. To identify whether the node is a single tile or a group of tiles, call its isLeaf() method. Other accessible fields and methods of a node are described in the Node section.
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.