ASPxClientTreeViewNode.GetExpanded Method
In This Article
Returns a value indicating whether the node is expanded.
#Declaration
TypeScript
GetExpanded(): boolean
#Returns
Type | Description |
---|---|
boolean |
|
#Remarks
The ASPxTreeView allows end-users to expand/collapse nodes. To determine the node’s expansion state, use the GetExpanded method on the client side. In order to expand/collapse a node on the client side, use the ASPxClientTreeViewNode.SetExpanded method.
To learn more, see the Expanding and Collapsing Nodes topic.
#Example
The code below shows how you can handle the client NodeClick event to expand and collapse nodes with a click.
<dx:aspxtreeview id="ASPxTreeView1" runat="server" datasourceid="XmlDataSource1">
<ClientSideEvents NodeClick="function(s, e) {
e.node.SetExpanded(!e.node.GetExpanded());
}"></ClientSideEvents>
</dx:aspxtreeview>
See Also