DataGridViewCell.SetValue(Int32, Object) 方法

定义

设置单元格的值。

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

参数

rowIndex
Int32

单元格的父行的索引。

value
Object

要设置的单元格值。

返回

true 如果已设置值,则为否则,为 false.

例外

rowIndex 小于 0 或大于或等于父 DataGridView级中的行数。

适用于

另请参阅