DataGridViewCell.Tag 属性

定义

获取或设置包含有关单元格补充数据的对象。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))>]
member this.Tag : obj with get, set
Public Property Tag As Object

属性值

Object

包含有关单元格数据的 ObjectAn Object that contains data about the cell. 默认为 nullThe default is null.

属性

注解

从类派生的任何类型 Object 都可以分配给此属性。Any type derived from the Object class can be assigned to this property. Tag属性通常用于存储与单元格显示的值密切关联的数据。The Tag property is commonly used to store data that is closely associated with the value displayed by the cell.

适用于

另请参阅