ASPxClientGridView.RowCollapsing Event
Fires when a user collapses a group row.
Declaration
RowCollapsing: ASPxClientEvent<ASPxClientGridViewRowCancelEventHandler<ASPxClientGridView>>
Event Data
The RowCollapsing event's data class is ASPxClientGridViewRowCancelEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
cancel | Specifies whether to cancel the related action (for example, row edit, export). Inherited from ASPxClientCancelEventArgs. |
visibleIndex | Gets the processed row’s visible index. |
Remarks
ASPxGridView allows users to expand or collapse group rows. When a user clicks a group row to collapse it, the control raises the RowCollapsing
event. You can use the cancel argument property to prevent users from collapsing the specified group row.
For more information on grouping in the grid, refer to the following topic: ASPxGridView - Group Data.
<dx:ASPxGridView ID="ASPxGridView1" runat="server" ClientInstanceName="grid">
<ClientSideEvents RowCollapsing="OnRowCollapsing" />
<%--...--%>
<SettingsBehavior AutoExpandAllGroups="true" />
<Settings ShowGroupPanel="true" />
</dx:ASPxGridView>
function OnRowCollapsing(s, e) {
if (e.visibleIndex == 0)
e.cancel = true;
}
See Also