Parameters
- 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.
Return Value
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