Skip to main content
All docs
V24.1

TreeListTextAlignment Enum

Lists values that specify text alignment in a cell or header.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

public enum TreeListTextAlignment

Members

Name Description
Auto

Aligns text based on cell content and column data type.

Left

Aligns cell text to the left.

Center

Centers cell text.

Right

Aligns cell text to the right.

Remarks

Use one of the following properties to align text in data cells or column captions:

The following code snippet aligns content of a selection column to the right:

@inject EmployeeTaskService EmployeeTaskService

<DxTreeList Data="TreeListData" KeyFieldName="Id" ParentKeyFieldName="ParentId">
    <Columns>
        <DxTreeListSelectionColumn TextAlignment="TreeListTextAlignment.Right" Width="100px" />
        <DxTreeListDataColumn FieldName="Name" Caption="Task" Width="40%" />
        <DxTreeListDataColumn FieldName="EmployeeName" />
        <DxTreeListDataColumn FieldName="StartDate" />
        <DxTreeListDataColumn FieldName="DueDate" />
    </Columns>
</DxTreeList>

@code {
    List<EmployeeTask> TreeListData { get; set; }

    protected override void OnInitialized() {
        TreeListData = EmployeeTaskService.GenerateData();
    }
}

The TreeList's column text alignment

See Also