A newer version of this page is available. Switch to the current version.

Fixed Columns and Bands

  • 2 minutes to read

Table Views allow you to anchor (fix) columns and bands to the left or right edge, so they are not horizontally scrolled with the View. This can be useful when columns (bands) should always be displayed onscreen, regardless of scrolling.

To fix a column or a band, use its BaseColumn.Fixed property. By default, this property is set to FixedStyle.None and the column/band is not fixed. Set the BaseColumn.Fixed property to FixedStyle.Left or FixedStyle.Right, to fix the column/band to the left or right View edge, respectively.

Fixed columns and bands are separated from other columns and bands by a vertical line. Its width is specified by the TableView.FixedLineWidth property.

By default, the GridControl's horizontal scrollbar fills only the control's scrollable part – the width of non-fixed columns. Set the TableView.ExtendScrollBarToFixedColumns property to true to extend the scrollbar's width to fixed columns.

The animation below shows the Table View with one column fixed to the left and one column fixed to the right.

FixedColumnsAnimation

The Table View provides three properties that allow fixed and not fixed columns to be obtained. These are: TableView.FixedLeftVisibleColumns, TableView.FixedRightVisibleColumns and TableView.FixedNoneVisibleColumns.

NOTE

Using Fixed Columns and Bands only makes sense when the auto-column width feature is disabled and the total width of columns/bands exceeds the View's width. Otherwise, horizontal scrolling is disabled.