Gets or sets the horizontal text alignment.
[Visual Basic]
Public Property HorizontalAlignment As C1.Win.C1TrueDBGrid.AlignHorzEnum
[C#]
public C1.Win.C1TrueDBGrid.AlignHorzEnum HorizontalAlignment {get;set;}
[Delphi]
public property HorizontalAlignment: C1.Win.C1TrueDBGrid.AlignHorzEnum read get_HorizontalAlignment write set_HorizontalAlignment;
Remarks
For data cells, the setting AlignHorzEnum.General means that text will be left-aligned and numbers will be right-aligned. This setting is only useful in bound mode, where the grid can query the data source to determine the data types of individual columns.
For column headers and footers, the setting AlignHorzEnum.General means that the alignment of the column's data cells should be used. Thus, if a column's data cells, headers, and footers all use general alignment, then the underlying data type determines the alignment for all aspects of the column's display.
Example
The following code center aligns the text horizontally in the Birth column:
Me.C1TrueDBGrid1.Splits(0).DisplayColumns("Birth").Style.HorizontalAlignment = C1.Win.C1TrueDBGrid.AlignHorzEnum.Center
· C#
this.c1TrueDBGrid1.Splits[0].DisplayColumns["Birth"].Style.HorizontalAlignment = C1.Win.C1TrueDBGrid.AlignHorzEnum.Center;
· Delphi
Self.C1TrueDBGrid1.Splits[0].DisplayColumns['Birth'].Style.HorizontalAlignment := C1.Win.C1TrueDBGrid.AlignHorzEnum.Center;
See Also
C1.Win.C1TrueDBGrid.Style Class | C1.Win.C1TrueDBGrid.Style Members | C1.Win.C1TrueDBGrid Namespace
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |