.NET Framework Class Library DataGridViewCell..::.Tag Property Gets or sets the object that contains supplemental data about the cell.
Namespace:
System.Windows.Forms
Assembly:
System.Windows.Forms (in System.Windows.Forms.dll)

Syntax
<TypeConverterAttribute(GetType(StringConverter))> _
<BindableAttribute(True)> _
Public Property Tag As Object
Get
Set
[TypeConverterAttribute(typeof(StringConverter))]
[BindableAttribute(true)]
public Object Tag { get; set; }
[TypeConverterAttribute(typeof(StringConverter))]
[BindableAttribute(true)]
public:
property Object^ Tag {
Object^ get ();
void set (Object^ value);
}
[<TypeConverterAttribute(typeof(StringConverter))>]
[<BindableAttribute(true)>]
member Tag : Object with get, set
Property ValueType: System..::.ObjectAn Object that contains data about the cell. The default is nullNothingnullptra null reference (Nothing in Visual Basic).

Remarks
Any type derived from the Object class can be assigned to this property. The Tag property is commonly used to store data that is closely associated with the value displayed by the cell.

Version Information
.NET FrameworkSupported in: 4, 3.5, 3.0, 2.0 .NET Framework Client ProfileSupported in: 4, 3.5 SP1

Platforms
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

See Also
|
Biblioteca de clases de .NET Framework DataGridViewCell..::.Tag (Propiedad) Obtiene o establece el objeto que contiene datos complementarios sobre la celda.
Espacio de nombres:
System.Windows.Forms
Ensamblado:
System.Windows.Forms (en System.Windows.Forms.dll)

Sintaxis
<TypeConverterAttribute(GetType(StringConverter))> _
<BindableAttribute(True)> _
Public Property Tag As Object
Get
Set
[TypeConverterAttribute(typeof(StringConverter))]
[BindableAttribute(true)]
public Object Tag { get; set; }
[TypeConverterAttribute(typeof(StringConverter))]
[BindableAttribute(true)]
public:
property Object^ Tag {
Object^ get ();
void set (Object^ value);
}
[<TypeConverterAttribute(typeof(StringConverter))>]
[<BindableAttribute(true)>]
member Tag : Object with get, set
Valor de propiedadTipo: System..::.ObjectObject que contiene datos sobre la celda. El valor predeterminado es nullNothingnullptrreferencia null (Nothing en Visual Basic).

Comentarios
A esta propiedad se le puede asignar cualquier tipo derivado de la clase Object. La propiedad Tag se utiliza normalmente para almacenar datos estrechamente asociados al valor que muestra la celda.

Información de versión
.NET FrameworkCompatible con: 4, 3.5, 3.0, 2.0 .NET Framework Client ProfileCompatible con: 4, 3.5 SP1

Plataformas
Windows 7, Windows Vista SP1 o posterior, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (no se admite Server Core), Windows Server 2008 R2 (se admite Server Core con SP1 o posterior), Windows Server 2003 SP2
.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.

Vea también
|