ASPxClientGridView.ExpandAllDetailRows Method
Expands all detail rows.
Declaration
ExpandAllDetailRows(): void
Remarks
If the ASPxGridViewDetailSettings.AllowOnlyOneMasterRowExpanded option is set to false
, an end-user can expand multiple detail rows simultaneously. Use the ExpandAllDetailRows method to expand all detail rows.
Individual detail rows can be expanded via the ASPxClientGridView.ExpandDetailRow method.
To learn more, see Expanding and Collapsing Detail Rows.
Example
<dx:ASPxButton ID="ASPxButton1" runat="server" Text="Expand All Detail Rows" AutoPostBack="False">
<ClientSideEvents Click="function(s, e) {grid.ExpandAllDetailRows();}" />
</dx:ASPxButton>
<dx:ASPxButton ID="ASPxButton2" runat="server" Text="Collapse All Detail Rows" AutoPostBack="False">
<ClientSideEvents Click="function(s, e) {grid.CollapseAllDetailRows();}" />
</dx:ASPxButton>
<dx:ASPxGridView ID="grid" runat="server" ClientInstanceName="grid" DataSourceID="CustomersDataSource" KeyFieldName="CustomerID" >
<Columns>
<dx:GridViewDataColumn FieldName="ContactName" />
<dx:GridViewDataColumn FieldName="CompanyName" />
<dx:GridViewDataColumn FieldName="City" />
<dx:GridViewDataColumn FieldName="Country" />
</Columns>
<Templates>
<DetailRow>
...
</DetailRow>
</Templates>
<SettingsDetail ShowDetailRow="true" />
</dx:ASPxGridView>
See Also