Caption Property (DataGrid Control, Column Object)

       

For a DataGrid control, this property determines the text displayed in the caption bar at the top of the grid.

For a Column object, this property determines the text displayed in the column's heading area.

Syntax

object.Caption [= value]

The Caption property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
value A string expression that determines what is displayed, as described below.

Remarks

Setting the Caption property to an empty string for a DataGrid control hides its caption bar.

Setting the Caption property to an empty string for a Column object clears the text in the column's heading area but does not hide the heading. Column captions are only displayed if the DataGrid control's ColumnHeaders property is set to True and the HeadLines property is not set to 0.