ADAdministrator Syncfusion Team August 20, 2003 11:57 PM
In a GridDataBoundGrid, you cannot set cell specific properties (other than CellValue or Text) using an indexer as in your sample code.
The reason is that in a GridDataBoundGrid, the only data storage is the bound datasource. That only holds a single value. It does not hold TextColor, or BackColor , or any of the other many cell specific properties.
So, in order to set cell specific properties in a GriDDataBoundGrid, you must catch the PrepareViewStyleInfo event (or Model.QueryCellInfo event). In your handler, you check e.RowIndex and e.ColIndex, and if these point to some cell you want to change, you set e.Style to the value you want.