Skip to main content

ASPxClientTreeList.NodeClick Event

Fires on the client when a node is clicked.

Declaration

NodeClick: ASPxClientEvent<ASPxClientTreeListNodeEventHandler<ASPxClientTreeList>>

Event Data

The NodeClick event's data class is ASPxClientTreeListNodeEventArgs. The following properties provide information specific to this event:

Property Description
cancel Gets or sets a value indicating whether the action which raised the event should be canceled.
htmlEvent Provides access to the parameters associated with the ASPxClientTreeList.NodeClick and ASPxClientTreeList.NodeDblClick events.
nodeKey Gets the processed node’s key value.

Remarks

ASPxTreeList raises the NodeClick event when a user clicks a node.

The code sample below demonstrates how to select a node in the NodeClick event handler:

<dx:ASPxTreeList ID="ASPxTreeList1" runat="server" ... >
    <!-- ... -->
    <ClientSideEvents NodeClick="OnNodeClick" />
    <SettingsSelection Enabled="true" />
</dx:ASPxTreeList>
function OnNodeClick(s, e) {
    s.SelectNode(e.nodeKey);
}
See Also