Alignment Property
The Alignment property returns or sets a value that determines the horizontal alignment of the values in a control column or style object.
object.Alignment= value
Read/Write at run time and design time.
Property applies to Column and Style objects.
Values
Design Time |
Run Time |
0 - Left (default) |
dblLeft |
1 - Right |
dblRight |
2 - Center |
dblCenter |
3 - General |
dblGeneral |
For data cells, the setting 3 - General means that text will be left-aligned and numbers will be right-aligned. This setting is only useful in bound mode, where the control can query the data source to determine the data types of individual columns.
For column headers and footers, the setting 3 - 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.
See Also