Edit

Share via


DataGridViewCell.Tag Property

Definition

Gets or sets the object that contains supplemental data about the cell.

public:
 property System::Object ^ Tag { System::Object ^ get(); void set(System::Object ^ value); };
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.ComponentModel.StringConverter))]
public object Tag { get; set; }
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.ComponentModel.StringConverter))]
public object? Tag { get; set; }
[<System.ComponentModel.Bindable(true)>]
[<System.ComponentModel.TypeConverter(typeof(System.ComponentModel.StringConverter))>]
member this.Tag : obj with get, set
Public Property Tag As Object

Property Value

An Object that contains data about the cell. The default is null.

Attributes

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.

Applies to

See also