Skip to main content
Tab

ASPxGridViewBehaviorSettings.ColumnMoveMode Property

Gets or sets a value that defines how ASPxGridView columns can be rearranged using drag-and-drop.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(GridColumnMoveMode.AmongSiblings)]
public GridColumnMoveMode ColumnMoveMode { get; set; }

Property Value

Type Default Description
GridColumnMoveMode AmongSiblings

One of the GridColumnMoveMode enumeration values.

Available values:

Name Description
AmongSiblings

Grid columns and bands are only allowed to move within their parent band.

ThroughHierarchy

Grid columns and bands are allowed to move between parents and hierarchy levels organizing Data Cell Bands.

Property Paths

You can access this nested property as listed below:

Object Type Path to ColumnMoveMode
ASPxGridView
.SettingsBehavior .ColumnMoveMode
GridViewProperties
.SettingsBehavior .ColumnMoveMode

Remarks

Use the ColumnMoveMode property to specify how an end-user can customize the grid column’s layout using drag-and-drop.

Two modes are available:

  • In the AmongSiblings mode, you can move grid columns within their parent band. When you mode a parent band, it is moved with all its children.

  • In the ThroughHierarchy mode, you can move columns and bands between parents and hierarchy levels. This mode enables end-users to group columns in Data Cell Bands.

Concept

Move Columns

Example

Web Forms (in markup):

<dx:ASPxGridView ID="ASPxGridView1" runat="server" ...>
    <SettingsBehavior ColumnMoveMode="ThroughHierarchy" />
    ...
</dx:ASPxGridView>

Web Forms (in code):

ASPxGridView grid1 = new ASPxGridView();
grid1.ID = "grid1";
Page.Form.Controls.Add(grid1);
...
grid1.SettingsBehavior.ColumnMoveMode = GridColumnMoveMode.ThroughHierarchy;

MVC:

@Html.DevExpress().GridView(settings => {
    settings.Name = "grid";
    settings.SettingsBehavior.ColumnMoveMode = GridColumnMoveMode.ThroughHierarchy;
    ...
}).Bind(Model).GetHtml()

Online Demos

See Also