This topic has not yet been rated - Rate this topic

DataGridViewImageColumn.ValuesAreIcons Property

Gets or sets a value indicating whether cells in this column display Icon values.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)
[BrowsableAttribute(false)]
public bool ValuesAreIcons { get; set; }

Property Value

Type: System.Boolean
true if cells display values of type Icon; false if cells display values of type Image. The default is false.
ExceptionCondition
InvalidOperationException

The value of the CellTemplate property is null.

To ensure that the alpha channel of Icon values is painted correctly, set this property to true.

Getting or setting this property gets or sets the ValueIsIcon property of the object returned by the CellTemplate property. Setting this property also sets the ValueIsIcon property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value.

If the NullValue property of the object returned by the DefaultCellStyle property has a value equal to the standard error graphic of type Bitmap, changing the ValuesAreIcons property value to true automatically sets NullValue to the standard error graphic of type Icon. If NullValue has a value equal to the standard error graphic of type Icon, changing the ValuesAreIcons property value to false automatically sets NullValue to the standard error graphic of type Bitmap.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.