Back to Devexpress

OptionsColumn.AllowMove Property

windowsforms-devexpress-dot-xtragrid-dot-columns-dot-optionscolumn-39ae1a66.md

latest3.8 KB
Original Source

OptionsColumn.AllowMove Property

Gets or sets whether end-users can drag the column’s header.

Namespace : DevExpress.XtraGrid.Columns

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

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

Property Value

TypeDefaultDescription
Booleantrue

true if end-users can drag the column’s header; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to AllowMove
GridColumn

.OptionsColumn .AllowMove

|

Remarks

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

The View’s GridOptionsCustomization.AllowColumnMoving property can be used to prevent any columns from being moved by end-users.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AllowMove property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

XAF-how-to-add-an-unbound-column-to-gridlisteditor-to-execute-a-custom-action-for-a-record/CS/EFCore/ButtonInListEF/ButtonInListEF.Win/Controllers/SimpleBusinessActionGridListViewController.cs#L63

csharp
buttonColumn.OptionsColumn.AllowGroup = DefaultBoolean.False;
buttonColumn.OptionsColumn.AllowMove = false;
buttonColumn.OptionsColumn.AllowShowHide = false;

See Also

AllowColumnMoving

ShowColumnHeaders

OptionsColumn Class

OptionsColumn Members

DevExpress.XtraGrid.Columns Namespace