ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1DataColumn.Caption Property

Gets or sets the text in the column header.

[Visual Basic]

Public Property Caption As String

[C#]

public string Caption {get;set;}

[Delphi]

public property Caption: String read get_Caption write set_Caption;

Remarks

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

Example

The following code uses the Caption property to set the text for the First column header:

·      Visual Basic

       Me.C1TrueDBGrid1.Columns("First").Caption = "First Name"

·      C#

       this.c1TrueDBGrid1.Columns["First"].Caption = "First Name";

·      Delphi

       Self.C1TrueDBGrid1.Columns['First'].Caption = 'First Name';

See Also

C1DataColumn Class | C1DataColumn Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.