Skip to main content
All docs
V25.1
  • DxTreeList.AllowColumnReorder Property

    Specifies whether users can reorder columns.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [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:

    Blazor TreeList - Reorder columns

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

    <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