FlexPivot for WinForms
SetData(Int32,String,Object,Boolean) メソッド

C1.Win.C1FlexGrid.4.5.2 アセンブリ > C1.Win.C1FlexGrid 名前空間 > C1FlexGridBase クラス > SetData メソッド : SetData(Int32,String,Object,Boolean) メソッド
Row index.
Column name.
Value to assign to the cell.
Whether the value should be converted to the column's data type.
Assigns a value to a grid cell.
シンタックス
'宣言
 
Public Overloads Overridable Function SetData( _
   ByVal row As System.Integer, _
   ByVal colName As System.String, _
   ByVal value As System.Object, _
   ByVal coerce As System.Boolean _
) As System.Boolean
public virtual System.bool SetData( 
   System.int row,
   System.string colName,
   System.object value,
   System.bool coerce
)

パラメータ

row
Row index.
colName
Column name.
value
Value to assign to the cell.
coerce
Whether the value should be converted to the column's data type.

戻り値の型

True if the value was assigned to the cell, False otherwise.
解説

If coerce is set to true and the value can't be converted into the proper data type, the grid will fire the GridError event and the cell will retain its original value.

Using SetData(Int32,Int32,Object,Boolean) with coerce set to true is equivalent to setting the grid's indexer. For example, the following lines of code are equivalent:

flex.SetData(1, "ColName", "Hello", true); flex[1, "ColName"] = "Hello"; // same thing
参照

C1FlexGridBase クラス
C1FlexGridBase メンバ
オーバーロード一覧