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

单元格的父行的索引。

返回

拥有列的值DataGridViewButtonCellText(如果UseColumnTextForButtonValuetrue)。

注解

此方法可用于检索共享行中单元格的文本,该单元格无法在本地存储单元格值并保持共享。 必须传入实际行索引,因为共享行的索引为 -1。 有关行共享的详细信息,请参阅 有关缩放 Windows 窗体 DataGridView 控件的最佳做法

适用于

另请参阅