Skip to main content

ASPxClientGridView.RowExpanding Event

Fires when a user expands a group row.

Declaration

RowExpanding: ASPxClientEvent<ASPxClientGridViewRowCancelEventHandler<ASPxClientGridView>>

Event Data

The RowExpanding 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 expand it, the control raises the RowExpanding event. You can use the cancel argument property to prevent users from expanding 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 RowExpanding="OnRowExpanding" />
    <%--...-->
    <Settings ShowGroupPanel="true" />
</dx:ASPxGridView>
function OnRowExpanding(s, e) {
    if(e.visibleIndex == 1)
        e.cancel = true;
}
See Also