[]
        
(Showing Draft Content)

Alternating Rows

Alternating rows improve FlexGrid readability by applying different visual styles to alternating data rows. This styling helps distinguish adjacent rows and improves navigation in wide or dense datasets.

The feature supports configurable alternation logic, customizable appearance settings, and integration with detail rows.


Alternating Strategy

The AlternatingStrategy property determines how alternating rows are calculated.

Strategy

Behavior

Recommended Usage

Index

Alternation is applied based on the current row order.

Sorting or filtering the data can change the row order and, therefore, the alternating row pattern.

Standard tabular layouts and dynamic sorting/filtering scenarios

DataIndex

Alternation is based on the underlying data-source index. Striping remains consistent relative to the source data.

Master-detail layouts and detail row scenarios


Alternating Row Direction

The AlternatingRows property specifies whether alternating styling is applied to even or odd rows.

Value

Description

Even

Applies alternating styling to even rows

Odd

Applies alternating styling to odd rows

This setting allows striping direction to be reversed without changing the assigned styles.

Example:

grid.AlternatingRows = GridAlternatingRows.Odd;

C1WPF Row - Odd alternating rows


Appearance Customization

Alternating row appearance is configured through dedicated styling properties.

Property

Description

AlternatingRowBackground

Background color for alternating rows

AlternatingRowForeground

Text color for alternating rows

AlternatingRowHeaderBackground

Background color for alternating row headers

AlternatingRowHeaderForeground

Text color for alternating row headers

AlternatingRowStyle

Style applied to alternating row cells

AlternatingRowHeaderStyle

Style applied to alternating row headers

Example:

grid.AlternatingRowHeaderBackground = alternatingRowHeaderBackground;
grid.AlternatingRowHeaderForeground = alternatingRowHeaderForeground;

Selection and Hover Integration

Alternating row styling integrates with selection and mouse-over states.

Default selection and hover brushes use semi-transparent rendering so that alternating row backgrounds remain visible during interaction.



Detail Row Support

FlexGridDetailProvider includes the AlternateDetails property, which determines whether detail rows participate in alternating-row styling.

Configuration

Behavior

Default behavior

Detail rows participate in alternating-row styling

AlternateDetails = false

Detail rows use standard row styling without alternating-row formatting