# DataGridViewImageColumn

Namespace: **Wisej.Web**

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

* [DataGridViewElement](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewelement.md)
  * [DataGridViewBand](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewband.md)
    * [DataGridViewColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcolumn.md)
      * [DataGridViewImageColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecolumn.md)

Represents a [DataGridView](/api/wisej.web/lists-and-grids/datagridview.md) column that contains a collection of [DataGridViewImageCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecell.md) cells.

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

```csharp
public class DataGridViewImageColumn : DataGridViewColumn
```

{% endtab %}

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

```visual-basic
Public Class DataGridViewImageColumn
    Inherits DataGridViewColumn
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/hsR4ok3152WyAf8J2C1u) DataGridViewImageColumn()

Initializes a new instance of the [DataGridViewImageColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecolumn.md) class to the default state.

### ![](/files/hsR4ok3152WyAf8J2C1u) DataGridViewImageColumn(cellTemplate)

Initializes a new instance of the [DataGridViewImageColumn](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecolumn.md) class to the default state.

| Name             | Type                                                                                                    | Description                                                                                                                               |
| ---------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **cellTemplate** | [DataGridViewImageCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecell.md) | An existing [DataGridViewImageCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecell.md) to use as a template. |

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) CellImage

[Image](https://docs.microsoft.com/dotnet/api/system.drawing.image): Gets or sets the image displayed in the cells that have a null value. (Default: `null`)

This value is inherited by all the cells in the column. However, the value set in the specific cell overrides the value from the owner column.

### ![](/files/hsR4ok3152WyAf8J2C1u) CellImageAlignment

[DataGridViewContentAlignment](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcontentalignment.md): Gets or sets the image alignment in the cells for the column. (Default: `NotSet`)

This value is inherited by all the cells in the column. However, the value set in the specific cell overrides the value from the owner column. **Throws:**

* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception) The value of the [CellTemplate](#celltemplate) property is null.

### ![](/files/hsR4ok3152WyAf8J2C1u) CellImageLayout

[DataGridViewImageCellLayout](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecelllayout.md): Gets or sets the image layout in the cells for this column. (Default: `NotSet`)

This value is inherited by all the cells in the column. However, the value set in the specific cell overrides the value from the owner column. **Throws:**

* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception) The value of the [CellTemplate](#celltemplate) property is null.

### ![](/files/hsR4ok3152WyAf8J2C1u) CellImageSource

[String](https://docs.microsoft.com/dotnet/api/system.string): Gets or sets the image URL or name displayed in cells that have a null value. (Default: `null`)

This value is inherited by all the cells in the column. However, the value set in the specific cell overrides the value from the owner column.

### ![](/files/hsR4ok3152WyAf8J2C1u) CellTemplate

[DataGridViewCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcell.md): Returns or sets the template used to model cell appearance.

**Throws:**

* [InvalidOperationException](https://docs.microsoft.com/dotnet/api/system.invalidoperationexception) The type is null.
* [InvalidCastException](https://docs.microsoft.com/dotnet/api/system.invalidcastexception) The set type is not compatible with type [DataGridViewImageCell](/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecell.md).

## Methods

### ![](/files/lzopMboA31bVq8UIcbT3) OnWebRender(config)

Renders the client component.

| Parameter  | Type                                                          | Description                   |
| ---------- | ------------------------------------------------------------- | ----------------------------- |
| **config** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic configuration object. |

## Implements

| Name                                                                              | Description                                                                                                     |
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| [IUserData](/api/wisej.web/interfaces/wisej.web.iuserdata.md)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface. |
| [IWisejComponent](/api/wisej.core/interfaces/wisej.core.iwisejcomponent.md)       | All wisej components implement this interface.                                                                  |
| [IWisejSerializable](/api/wisej.core/interfaces/wisej.core.iwisejserializable.md) | Allows an object to serialize itself.                                                                           |


---

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