Export (0) Print
Expand All

DataGridViewImageCell.ValueIsIcon Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets a value indicating whether this cell displays an Icon value.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public bool ValueIsIcon { get; set; }
/** @property */
public boolean get_ValueIsIcon ()

/** @property */
public void set_ValueIsIcon (boolean value)

public function get ValueIsIcon () : boolean

public function set ValueIsIcon (value : boolean)

Property Value

true if this cell displays an Icon value; otherwise, false.

To ensure that the alpha channel of Icon values is painted correctly, set this property to true. When this property is true, the FormattedValueType and ValueType properties return a Type object representing the Icon type.

Setting the ValuesAreIcons property of the owning column 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.

When the value of this property changes for a cell in the row for new records, the image displayed in the cell is updated to the current value of the DefaultNewRowValue property.

Unlike the column ValuesAreIcons property, the cell ValueIsIcon property does not automatically update the NullValue property of the associated cell style when you change its value. When you change the cell ValueIsIcon property value to true, be sure to set the NullValue property of the object returned by the Style property to a valid Icon. When you change the ValueIsIcon property value to false, be sure to set the NullValue property to a valid Image.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0

Community Additions

© 2014 Microsoft