Skip to main content
All docs
V17.2

Fixed Rows

Vertical grid controls allow rows to be anchored to the top or bottom edge. When a row is anchored, its content isn’t vertically scrolled. Such rows are called - fixed rows.

FixedRows

To make a row fixed, use its BaseRow.Fixed property. This property can be set to Top, Bottom or None.

Rows that are currently fixed can be accessed via the VGridControlBase.FixedTopRows and VGridControlBase.FixedBottomRows collections.

To fix a nested row, first, remove it from its parent and add it to the control’s root row collection. Then, set the row’s BaseRow.Fixed property accordingly.


using DevExpress.XtraVerticalGrid.Rows;

void FixNestedRow(string fieldName, FixedStyle fixedStyle) {
    this.propertyGridControl1.BeginUpdate();
    BaseRow row = this.propertyGridControl1.GetRowByFieldName(fieldName);
    row.ParentRow.ChildRows.Remove(row);
    propertyGridControl1.Rows.Add(row);
    row.Fixed = fixedStyle;
    this.propertyGridControl1.EndUpdate();
}

See a complete example in the VertGridMainDemo demo.

Fixed Row Appearance

Fixed rows are separated from others by dividers whose width is specified by the BaseOptionsView.FixedLineWidth property. To change the color used to paint fixed row dividers, use the BackColor property provided by the VGridAppearanceCollection.FixedLine object.