The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientGridView.CollapseAllDetailRows Method

Collapses all detail rows.


CollapseAllDetailRows(): void


If the ASPxGridViewDetailSettings.AllowOnlyOneMasterRowExpanded option is set to false, an end-user can expand multiple detail rows simultaneously. To collapse all expanded detail rows, use the CollapseAllDetailRows method.

Individual detail rows can be collapsed via the ASPxClientGridView.CollapseDetailRow method.

To learn more, see Expanding and Collapsing Detail Rows.


<dx:ASPxButton ID="ASPxButton1" runat="server" Text="Expand All Detail Rows" AutoPostBack="False">
     <ClientSideEvents Click="function(s, e) {grid.ExpandAllDetailRows();}" />

<dx:ASPxButton ID="ASPxButton2" runat="server" Text="Collapse All Detail Rows" AutoPostBack="False">
     <ClientSideEvents Click="function(s, e) {grid.CollapseAllDetailRows();}" />

<dx:ASPxGridView ID="grid" runat="server" ClientInstanceName="grid" DataSourceID="CustomersDataSource" KeyFieldName="CustomerID" >
            <dx:GridViewDataColumn FieldName="ContactName" />
            <dx:GridViewDataColumn FieldName="CompanyName" />
            <dx:GridViewDataColumn FieldName="City" />
            <dx:GridViewDataColumn FieldName="Country" />
     <SettingsDetail ShowDetailRow="true" />
See Also