DataGridViewColumnHeaderCell.SetValue(Int32, Object) 方法

定义

设置单元格的值。Sets the value of the cell.

protected:
 override bool SetValue(int rowIndex, System::Object ^ value);
protected override bool SetValue (int rowIndex, object value);
override this.SetValue : int * obj -> bool
Protected Overrides Function SetValue (rowIndex As Integer, value As Object) As Boolean

参数

rowIndex
Int32

该单元格的父行索引。The index of the cell's parent row.

value
Object

要设置的单元格值。The cell value to set.

返回

Boolean

如果值已设置,则为 true;否则为 falsetrue if the value has been set; otherwise false.

例外

rowIndex 不是 -1。rowIndex is not -1.

适用于

另请参阅