ASPxClientGridView.ColumnGrouping Event
Fires before the grid groups its data by column values.
Declaration
ColumnGrouping: ASPxClientEvent<ASPxClientGridViewColumnCancelEventHandler<ASPxClientGridView>>
Event Data
The ColumnGrouping event's data class is ASPxClientGridViewColumnCancelEventArgs. 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. |
column | Gets the processed client column. |
Remarks
The grid allows users to group its data by multiple columns. When a user drags a column to the Group Panel, the control raises the ColumnGrouping
event. You can use the cancel argument property to prevent users from grouping data by the processed column.
For more information on grouping in the grid, refer to the following topic: ASPxGridView - Group Data.
<dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" KeyFieldName="CustomerID">
<Columns>
<dx:GridViewDataTextColumn FieldName="CompanyName" VisibleIndex="0" />
<%--...--%>
</Columns>
<ClientSideEvents ColumnGrouping="OnColumnGrouping" />
<Settings ShowGroupPanel="true" />
</dx:ASPxGridView>
function OnColumnGrouping(s, e) {
if (e.column.fieldName == "CompanyName") {
e.cancel = true;
}
}
See Also