ComponentOne True DBGrid Pro 8
Tutorial 12 - Displaying Rows in Alternating Colors

In this tutorial, you will learn how to use the AlternatingRowStyle property and built-in styles to apply alternating colors to grid rows to improve their readability.

  1. Start with the project used in Tutorial 10.

  2. Right-click the grid and select Properties from the context menu to display the Property Pages dialog. Click the Splits tab and expand the Splits(00) object. Double-click the AlternatingRowStyle node to toggle its value.

    The grid has default settings for both the EvenRow and OddRow styles. We will use the default settings first and then change the settings for the EvenRow style.

Run the program and observe the following:

Run the program and observe the following:

TDBGrid1 displays data as in the previous figure, except that even-numbered rows now have a light gray background.

This concludes Tutorial 12.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback