# DataGridViewContentAlignment

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

Defines constants that indicate the alignment of content within a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) cell.

{% tabs %}
{% tab title="C#" %}

```csharp
public enum DataGridViewContentAlignment : Enum
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Enum DataGridViewContentAlignment As [Enum]
```

{% endtab %}
{% endtabs %}

## Fields

| 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.     |

## Used By

| Name                                                                                                                                              | Description                                                                                                                                                                      |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DataGridViewImageCell.ImageAlignment](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecell.md#imagealignment)             | Gets or sets the alignment of the image in the cell.                                                                                                                             |
| [DataGridViewImageColumn.CellImageAlignment](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecolumn.md#cellimagealignment) | Gets or sets the image alignment in the cells for the column.                                                                                                                    |
| [DataGridViewCellStyle.Alignment](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcellstyle.md#alignment)                       | Returns or sets a value indicating the position of the cell content within a [DataGridViewCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell.md) cell. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcontentalignment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
