DataGridFixedStyle Enum

Lists values that specify column behavior when users scroll the Data Grid horizontally.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.2.dll

Declaration

public enum DataGridFixedStyle

Members

Name Description
Left

The column is anchored to the grid's left edge and always remains visible when users scroll the grid horizontally.

None

The column is moved when users scroll the grid horizontally.

Right

The column is anchored to the grid's right edge and always remains visible when users scroll the grid horizontally.

Related API Members

The following properties accept/return DataGridFixedStyle values:

Remarks

The Data Grid displays the horizontal scroll bar in the following cases:

Use a column's FixedStyle property to anchor it to the grid's left or right edge. Fixed columns always remain visible on screen while users scroll the grid horizontally.

<DxDataGrid Data="@DataSource"
            HorizontalScrollBarMode="ScrollBarMode.Visible"
            PagerNavigationMode="PagerNavigationMode.NumericButtons">
    <DxDataGridCommandColumn Width="100px" FixedStyle="DataGridFixedStyle.Left" />
    <DxDataGridColumn Field="@nameof(ProductFlat.ProductName)" Width="250px" />
    <DxDataGridColumn Field="@nameof(ProductFlat.Availability)" Width="110px" 
                      FixedStyle="DataGridFixedStyle.Right">
        <DisplayTemplate>
            @*...*@
        </DisplayTemplate>
    </DxDataGridColumn>
    <DxDataGridColumn Field="@nameof(ProductFlat.Category)" Width="250px" />
    <DxDataGridColumn Field="@nameof(ProductFlat.Subcategory)" Width="250px" />
    <DxDataGridDateEditColumn Field="@nameof(ProductFlat.LastUpdated)" Width="250px" />
</DxDataGrid>

Data Grid Fixed Columns

Run Demo: Data Grid - Fixed Columns

See Also