Skip to main content

If a DataGridView control on your form contains an image column and cell and need to display null values, it will be replaced with the standard "X" image.

If you need different behavior, i.e. to make sure that no image will be displayed, you have to change the NullValue property of the column to "null".

Here is the code example demonstrates setting the NullValue for an image column:

this.dataGridViewImageColumn1.DefaultCellStyle.NullValue = null;

- Advertisement -
- Advertisement -