DataGridViewCell.DataGridViewCellAccessibleObject.Value 屬性

定義

取得或設定字串,代表主控儲存格的格式值。

public:
 virtual property System::String ^ Value { System::String ^ get(); void set(System::String ^ value); };
public override string Value { get; set; }
public override string? Value { get; set; }
member this.Value : string with get, set
Public Overrides Property Value As String

屬性值

儲存格值的 String 表示。

例外狀況

Owner 屬性的值是 null

備註

屬性 Value 包含字串,表示儲存格 FormattedValue 屬性的值。 如果 FormattedValuenullValue 則包含字串 「 (null) 」。

如果擁有的資料格是標題儲存格、唯讀或不屬於資料列,則設定此屬性沒有任何作用。 否則,請設定此屬性:

  • 結束目前正在進行的任何編輯,並認可值。

  • 使用儲存格 GetFormattedValueParseFormattedValue 方法,將指定的值轉換成儲存格 ValueType 屬性所指示的類型。

  • 將儲存格值設定為已轉換的值。

適用於

另請參閱