DataGridViewCell.SetValue(Int32, Object) 方法
定義
設定儲存格的值。Sets the value of the cell.
protected:
virtual bool SetValue(int rowIndex, System::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
儲存格的父資料列索引。The index of the cell's parent row.
- value
- Object
要設定的儲存格值。The cell value to set.
傳回
如果已經設定這個值,則為 true
,否則為 false
。true
if the value has been set; otherwise, false
.
例外狀況
rowIndex
小於 0 或是大於或等於父 DataGridView 中的資料列數。rowIndex
is less than 0 or greater than or equal to the number of rows in the parent DataGridView.
ColumnIndex 小於 0。ColumnIndex is less than 0.