# ImageColumn

The **DataGridViewImageColumn** class is a specialized type of the **DataGridViewColumn** class used to logically host cells that display images. A **DataGridViewImageColumn** has an associated **DataGridViewImageCell** in every **DataGridViewRow** that intersects it. Each cell is capable of containing an Image or an Icon.

By default, empty cells display a default error graphic. To prevent this graphic from appearing for cell values equal to `null` or `DBNull.Value`, set the **DataGridViewCellStyle.NullValue** property of the cell style object returned by the **DefaultCellStyle** property to `null` before adding rows to the control. This does not affect the row for new records, however. To prevent the error graphic from appearing in the row for new records when the control **AllowUserToAddRows** property value is `true`, you must also either explicitly set the cell value to `null` in a handler for the control **RowsAdded** event or set the column **CellTemplate** property to an instance of a **DataGridViewImageCell**-derived type with an overridden **DefaultNewRowValue** property that returns `null`.

The default sort mode for this column type is `NotSortable`.

{% hint style="info" %}
For a full list of properties, methods and events see the [API documentation](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewimagecolumn).
{% endhint %}


---

# 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/docs/controls/lists/datagridview/imagecolumn-1.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.
