Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxTreeList.AllowColumnReorder Property

Specifies whether users can reorder columns.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(true)]
[Parameter]
public bool AllowColumnReorder { get; set; }

#Property Value

Type Default Description
Boolean true

true to allow users to reorder columns; otherwise, false.

#Remarks

The TreeList component allows users to drag and drop column headers to reorder columns:

Set the AllowColumnReorder property to false to prevent users from reordering columns:

Razor
<DxTreeList Data="Data"
            AllowColumnReorder="false"
            ChildrenFieldName="Satellites">
    <Columns>
        <DxTreeListDataColumn FieldName="Name"/>
        <DxTreeListDataColumn FieldName="TypeOfObject" Caption="Type"/>
        <DxTreeListDataColumn FieldName="Mass10pow21kg" Caption="Mass" DisplayFormat="N2">
            <HeaderCaptionTemplate>Mass, 10<sup>21</sup> &#215; kg</HeaderCaptionTemplate>
        </DxTreeListDataColumn>
        <DxTreeListDataColumn FieldName="MeanRadiusInKM" Caption="Radius" DisplayFormat="N2">
            <HeaderCaptionTemplate>Radius, km</HeaderCaptionTemplate>
        </DxTreeListDataColumn>
        <DxTreeListDataColumn FieldName="Volume10pow9KM3" Caption="Volume" DisplayFormat="N2">
            <HeaderCaptionTemplate>Volume, 10<sup>9</sup> &#215; km<sup>3</sup></HeaderCaptionTemplate>
        </DxTreeListDataColumn>
        <DxTreeListDataColumn FieldName="SurfaceGravity" Caption="Gravity" DisplayFormat="N2">
            <HeaderCaptionTemplate>Gravity, m/s<sup>2</sup></HeaderCaptionTemplate>
        </DxTreeListDataColumn>
        <DxTreeListDataColumn FieldName="Density" Visible="false" DisplayFormat="N2">
            <HeaderCaptionTemplate>Density, g/cm<sup>3</sup></HeaderCaptionTemplate>
        </DxTreeListDataColumn>
    </Columns>
</DxTreeList>

Use the DxTreeListColumn.AllowReorder property to disable reordering for an individual column.

See Also