DataGridViewButtonCell.GetValue(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
擷取與按鈕相關的文字。
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
Text若UseColumnTextForButtonValue為 true,則 或 擁有欄位的值。
備註
此方法有助於擷取共用列中無法儲存儲存格值且保持共享的儲存格文字。 你必須通過實際的列索引,因為共享列的索引是 -1。 如需有關資料列共用的詳細資訊,請參閱縮放 Windows Forms DataGridView 控制項的最佳做法。