Customizing the Grid's Appearance > Captions, Headers, and Footers > Column and grid captions |
For Column objects, the Caption property specifies the text that appears in each column's header area.
If you are using True DBGrid in bound mode with an automatic layout, the column captions are set automatically at run time. At design time, you can use the Retrieve Fields context menu item to initialize the grid layout according to the current RecordSource setting for the Data control to which the grid is bound.
You can also set column captions at design time using the Columns property page, or at run time by manipulating the Columns collection in code. For more information, see Configuring Columns at Run Time.
The Caption property also applies to the TDBGrid control itself, which lets you provide a descriptive header for the entire grid.
By default, True DBGrid displays headings for each column, even if you never set the Caption property of an individual column explicitly. However, you can hide all column headings by setting the ColumnHeaders property to False.