ASPxGridView.IsRowExpanded(Int32) Method
In This Article
Identifies whether the specified group row is expanded.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
visible |
Int32 | The row’s visible index. |
#Returns
Type | Description |
---|---|
Boolean |
|
#Remarks
Call the IsRowExpanded
method to get information about the current expanded or collapsed state of the specified group row.
For more information on sorting in the grid, refer to the following topic: ASPxGridView - Group Data.
<dx:ASPxGridView ID="ASPxGridView1" runat="server" ClientInstanceName="grid"
OnCustomCallback="ASPxGridView1_CustomCallback">
<%--...--%>
<Settings ShowGroupPanel="true" />
</dx:ASPxGridView>
<dx:ASPxButton ID="ASPxButton1" runat="server" Text="Expand/Collapse the First Row" AutoPostBack="false">
<ClientSideEvents Click="OnClick" />
</dx:ASPxButton>
function OnClick(s, e) {
grid.PerformCallback();
}
protected void ASPxGridView1_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) {
if(ASPxGridView1.IsRowExpanded(0))
ASPxGridView1.CollapseRow(0);
else
ASPxGridView1.ExpandRow(0);
}
See Also