How to Expand and Collapse Groups
- 2 minutes to read
ASPxCardView provides group buttons that allow end users to expand or collapse groups. The IsGroupRowExpanded method identifies whether the group row is expanded or collapsed.
#Expand Group Row
Use the following APIs to expand a group row.
API Member | Description |
---|---|
Specifies whether the card view automatically expands all group rows. | |
ASPx ASPx | Expands the specified group row. |
ASPx ASPx | Expands all group rows. |
The card view raises this event before the group row is expanded. |
#Collapse Group Rows
Use the following APIs to expand the group row.
API Member | Description |
---|---|
ASPx ASPx | Collapses the specified group row. |
ASPx ASPx | Collapses all group rows. |
The card view raises this event before the group row is collapsed. |
#Examples
The following example illustrates how to expand and collapse ASPxCardView groups.
The following example illustrates how to expand a group by clicking it.
if (cardView.IsGroupRow(e.visibleIndex)) { if (cardView.IsGroupRowExpanded(e.visibleIndex)) cardView.CollapseGroupRow(e.visibleIndex); else cardView.ExpandGroupRow(e.visibleIndex); }