Tab

GridViewColumn.FixedStyle Property

Gets or sets whether the column is fixed on the ASPxGridView's left edge.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

Declaration

[DefaultValue(GridViewColumnFixedStyle.None)]
public GridViewColumnFixedStyle FixedStyle { get; set; }

Property Value

Type Default Description
GridViewColumnFixedStyle

None

A GridViewColumnFixedStyle enumeration value that specifies whether the column is fixed on the ASPxGridView's left edge.

Available values:

Name Description
None

A column isn't fixed to a grid's left edge, can be moved by dragging, and takes part in horizontal scrolling.

Left

A column is anchored to a grid's left edge.

Remarks

If the total column width exceeds the ASPxGridView's width and the grid displays the horizontal scrollbar, end users can scroll the grid's contents column by column. Additionally, you can set the column's FixedStyle property to GridViewColumnFixedStyle.Left to freeze individual columns. This allows your end users to scroll through the other columns.

<dx:ASPxGridView ID="Grid" >
    <Columns>
        <dx:GridViewDataColumn FieldName="ContactName" Width="150" FixedStyle="Left" />
        <dx:GridViewDataColumn FieldName="CompanyName" Width="180" FixedStyle="Left" />
        <dx:GridViewDataColumn FieldName="City" Width="130" />
        ...
    </Columns>
    <Settings HorizontalScrollBarMode="Visible" />
    <Styles>
        <FixedColumn BackColor="LightYellow" />
    </Styles>
</dx:ASPxGridView>

To display the horizontal scroll bar in the grid, use the ASPxGridSettings.HorizontalScrollBarMode property.

<dx:ASPxGridView ID="Grid" >
    <Columns>
        ...
    </Columns>
    <Settings HorizontalScrollBarMode="Visible" VerticalScrollBarMode="Visible" />
</dx:ASPxGridView>

Concept

Fixed Columns

Online Demo

ASPxGridView - Fixed Column

See Also