C1.Win.C1FlexGrid Namespace > C1FlexGridBase Class > SetData Method : SetData(Int32,String,Object,Boolean) Method |
'Declaration
Public Overloads Overridable Function SetData( _ ByVal row As Integer, _ ByVal colName As String, _ ByVal value As Object, _ ByVal coerce As Boolean _ ) As Boolean
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
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2