windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridview-dot-cangroupcolumn-x28-devexpress-dot-xtragrid-dot-columns-dot-gridcolumn-x29.md
Indicates whether end-users can group data by a column’s values.
Namespace : DevExpress.XtraGrid.Views.Grid
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
public override bool CanGroupColumn(
GridColumn column
)
Public Overrides Function CanGroupColumn(
column As GridColumn
) As Boolean
| Name | Type | Description |
|---|---|---|
| column | GridColumn |
A GridColumn object (or descendant) that represents the tested column.
|
| Type | Description |
|---|---|
| Boolean |
true end-users can involve the specified column in data grouping; otherwise, false.
|
This member supports the grid control’s internal infrastructure and is not intended to be used in your code.
The CanGroupColumn method returns true if the following conditions are met:
There are a number of ways to control sorting and grouping features available to end-users. The main properties affecting this are the View’s GridView.OptionsCustomization and the column’s GridColumn.OptionsColumn properties. Please refer to the Sorting in Code and Grouping topic for additional information.
Views use the CanGroupColumn method to determine whether the specified column’s header can be dragged and dropped onto the column header panel and whether the column header context menu enables the grouping of data by values of the specified column.
Important note : the actual grouping availability may not match the CanGroupColumn method’s return value. For instance, you may handle the GridView.DragObjectStart and GridView.DragObjectOver events to customize the column header dragging behavior. Additionally, you can handle the GridView.PopupMenuShowing event to customize the column header context menu.
See Also