DataGridViewContentAlignment Enumeration
.NET Framework 3.0
Defines constants that indicate the alignment of content within a DataGridView cell.
Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)
Assembly: System.Windows.Forms (in system.windows.forms.dll)
| Member name | Description | |
|---|---|---|
| BottomCenter | The content is aligned vertically at the bottom and horizontally at the center of a cell. | |
| BottomLeft | The content is aligned vertically at the bottom and horizontally at the left of a cell. | |
| BottomRight | The content is aligned vertically at the bottom and horizontally at the right of a cell. | |
| MiddleCenter | The content is aligned at the vertical and horizontal center of a cell. | |
| MiddleLeft | The content is aligned vertically at the middle and horizontally at the left of a cell. | |
| MiddleRight | The content is aligned vertically at the middle and horizontally at the right of a cell. | |
| NotSet | The alignment is not set. | |
| TopCenter | The content is aligned vertically at the top and horizontally at the center of a cell. | |
| TopLeft | The content is aligned vertically at the top and horizontally at the left of a cell. | |
| TopRight | The content is aligned vertically at the top and horizontally at the right of a cell. |
This enumeration is used by the DataGridViewCellStyle.Alignment property.
The following code example illustrates the use of this type. For more information, see How to: Format Data in the Windows Forms DataGridView Control.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: