DataGridViewButtonCell.GetValue(Int32) 方法

定義

擷取與按鈕相關的文字。

protected:
 override System::Object ^ GetValue(int rowIndex);
protected override object GetValue(int rowIndex);
protected override object? GetValue(int rowIndex);
override this.GetValue : int -> obj
Protected Overrides Function GetValue (rowIndex As Integer) As Object

參數

rowIndex
Int32

該格子父列的索引。

傳回

DataGridViewButtonCell TextUseColumnTextForButtonValuetrue,則 或 擁有欄位的值。

備註

此方法有助於擷取共用列中無法儲存儲存格值且保持共享的儲存格文字。 你必須通過實際的列索引,因為共享列的索引是 -1。 如需有關資料列共用的詳細資訊,請參閱縮放 Windows Forms DataGridView 控制項的最佳做法

適用於

另請參閱