Back to Devexpress

GridOptionsCustomization.AllowColumnMoving Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridoptionscustomization-472df3f6.md

latest3.1 KB
Original Source

GridOptionsCustomization.AllowColumnMoving Property

Gets or sets whether end-users are allowed to move columns by dragging their headers.

Namespace : DevExpress.XtraGrid.Views.Grid

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(true)]
[XtraSerializableProperty]
public virtual bool AllowColumnMoving { get; set; }
vb
<DefaultValue(True)>
<XtraSerializableProperty>
Public Overridable Property AllowColumnMoving As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true if end-users are allowed to move grid columns; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to AllowColumnMoving
GridView

.OptionsCustomization .AllowColumnMoving

|

Remarks

Column headers can be dragged within the column header panel to reorder columns or to the Customization Form to hide the columns. If the View’s GridOptionsCustomization.AllowGroup and the column’s OptionsColumn.AllowGroup options are enabled, column headers can also be dragged to the group panel.

To prevent individual columns from being moved set their OptionsColumn.AllowMove property to false.

Note that columns can still be moved via code using the GridColumn.VisibleIndex property regardless of the values of the AllowColumnMoving or OptionsColumn.AllowMove properties.

See Also

AllowMove

VisibleIndex

GridOptionsCustomization Class

GridOptionsCustomization Members

DevExpress.XtraGrid.Views.Grid Namespace