ASPxClientTreeView.ExpandAll Method
Expands all nodes in the ASPxTreeView on the client side.
Declaration
ExpandAll(): void
Remarks
The ExpandAll method expands all nodes which are currently collapsed. This method invokes the ASPxClientTreeView.ExpandedChanging event before expanding and the ASPxClientTreeView.ExpandedChanged event after expanding.
To expand all nodes on the server side, use the ASPxTreeView.ExpandAll method.
For more information see the Expanding and Collapsing Nodes topic.
Example
The code below demonstrates how you can expand and collapse all nodes on the client side.
<dx:ASPxTreeView ID="ASPxTreeView1" runat="server" ClientInstanceName="treeview" DataSourceID="XmlDataSource1">
</dx:ASPxTreeView>
<dx:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" Text="CollapseAll">
<ClientSideEvents Click="function(s, e) {treeview.CollapseAll();}" />
</dx:ASPxButton>
<dx:ASPxButton ID="ASPxButton2" runat="server" AutoPostBack="False" Text="ExpandAll">
<ClientSideEvents Click="function(s, e) {treeview.ExpandAll();}" />
</dx:ASPxButton>
See Also