Skip to main content
A newer version of this page is available. .
Tab

GridViewDataColumnSettings.AllowDragDrop Property

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

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(DefaultBoolean.Default)]
public DefaultBoolean AllowDragDrop { get; set; }

Property Value

Type Default Description
DefaultBoolean **Default**

One of the DefaultBoolean enumeration values.

Available values:

Name Description
True

Corresponds to a Boolean value of true.

False

Corresponds to a Boolean value of false.

Default

The value is determined by the current object’s parent object setting (e.g., a control setting).

Property Paths

You can access this nested property as listed below:

Show 36 property paths
Library Object Type Path to AllowDragDrop
ASP.NET Controls and MVC Extensions GridViewDataBinaryImageColumn
.Settings .AllowDragDrop
GridViewDataButtonEditColumn
.Settings .AllowDragDrop
GridViewDataCheckColumn
.Settings .AllowDragDrop
GridViewDataColorEditColumn
.Settings .AllowDragDrop
GridViewDataColumn
.Settings .AllowDragDrop
GridViewDataComboBoxColumn
.Settings .AllowDragDrop
GridViewDataDateColumn
.Settings .AllowDragDrop
GridViewDataDropDownEditColumn
.Settings .AllowDragDrop
GridViewDataHyperLinkColumn
.Settings .AllowDragDrop
GridViewDataImageColumn
.Settings .AllowDragDrop
GridViewDataMemoColumn
.Settings .AllowDragDrop
GridViewDataProgressBarColumn
.Settings .AllowDragDrop
GridViewDataSpinEditColumn
.Settings .AllowDragDrop
GridViewDataTextColumn
.Settings .AllowDragDrop
GridViewDataTimeEditColumn
.Settings .AllowDragDrop
GridViewDataTokenBoxColumn
.Settings .AllowDragDrop
GridViewEditDataColumn
.Settings .AllowDragDrop
ASP.NET Bootstrap Controls BootstrapGridViewBinaryImageColumn
.Settings .AllowDragDrop
BootstrapGridViewButtonEditColumn
.Settings .AllowDragDrop
BootstrapGridViewCheckColumn
.Settings .AllowDragDrop
BootstrapGridViewColorEditColumn
.Settings .AllowDragDrop
BootstrapGridViewComboBoxColumn
.Settings .AllowDragDrop
BootstrapGridViewDataColumn
.Settings .AllowDragDrop
BootstrapGridViewDateColumn
.Settings .AllowDragDrop
BootstrapGridViewDropDownEditColumn
.Settings .AllowDragDrop
BootstrapGridViewEditDataColumn
.Settings .AllowDragDrop
BootstrapGridViewHyperLinkColumn
.Settings .AllowDragDrop
BootstrapGridViewImageColumn
.Settings .AllowDragDrop
BootstrapGridViewMemoColumn
.Settings .AllowDragDrop
BootstrapGridViewProgressBarColumn
.Settings .AllowDragDrop
BootstrapGridViewSpinEditColumn
.Settings .AllowDragDrop
BootstrapGridViewTagBoxColumn
.Settings .AllowDragDrop
BootstrapGridViewTextColumn
.Settings .AllowDragDrop
BootstrapGridViewTimeEditColumn
.Settings .AllowDragDrop
ASP.NET MVC Extensions MVCxGridViewColumn
.Settings .AllowDragDrop
MVCxGridViewColumn<RowType>
.Settings .AllowDragDrop

Remarks

If the AllowDragDrop property is set to DefaultBoolean.Default, the column’s behavior is controlled by the ASPxGridView’s ASPxGridViewBehaviorSettings.AllowDragDrop property.

Concept

Move Columns

Example

Web Forms (declaratively):

<dx:ASPxGridView ID="ASPxGridView1" runat="server" ...>
    ...
    <SettingsBehavior AllowDragDrop="false" />
    <Columns>        
        <dx:GridViewDataTextColumn FieldName="QuantityPerUnit" VisibleIndex="1">
            <Settings AllowDragDrop="True" />
        </dx:GridViewDataTextColumn>
        ...
    </Columns>
</dx:ASPxGridView>

Web Forms (in code):

ASPxGridView grid1 = new ASPxGridView();
grid1.ID = "grid1";
Page.Form.Controls.Add(grid1);
...
grid1.SettingsBehavior.AllowDragDrop = DevExpress.Utils.DefaultBoolean.False;

GridViewDataTextColumn productColumn = new GridViewDataTextColumn();
productColumn.FieldName = "QuantityPerUnit";
productColumn.Settings.AllowDragDrop = DevExpress.Utils.DefaultBoolean.True;

MVC:

@Html.DevExpress().GridView(settings => {
    settings.Name = "grid";
    settings.SettingsBehavior.AllowDragDrop = DevExpress.Utils.DefaultBoolean.False;
    GridViewDataTextColumn productColumn = new GridViewDataTextColumn();
    productColumn.FieldName = "QuantityPerUnit";
    productColumn.Settings.AllowDragDrop = DevExpress.Utils.DefaultBoolean.True;
    ...
}).Bind(Model).GetHtml()

Online Demos

See Also