Nevron Open Vision Documentation
Alternating Rows

 
About Alternating Rows

Alternating rows are demonstrated by the following image:

Alternating rows are useful when you need to display grids with many columns, since the user can easily follow the values that belong to the same row. Thus alternating rows increase the readability of the grid.

Appearance and Visibility

The appearance of the alternating rows is controlled by the grid AlternatingRowBackgroundFill property. The visibility of the alternating rows is controlled by the AlternatingRows property. The following code example shows the alternating rows of a grid:

Showing Alternating Rows
Copy Code
grid.AlternatingRows = true;
grid.AlternatingRowBackgroundFill = new NColorFill(NColor.LightCoral);
By default the AlternatingRowBackgroundFill is specified by the grid theme, so if you do not specify an alternating rows background fill, such will be provided by the theme.
Interval and Length

The gird AlternatingRowsInterval property controls the count of rows that are having the default row background. The AlternatingRowsLength property controls the count of rows that are having the alternating row background. The following image demonstrates a grid interval set to 2 and length set to 3:

This effect is achieved with the following code:

Interval and Length
Copy Code
grid.AlternatingRowsInterval = 2;
grid.AlternatingRowsLength = 3;
Send Feedback