AD
Administrator
Syncfusion Team
April 2, 2003 08:21 AM UTC
In a GridDataBoundGrid, you cannot use indexers to set style properties (other than the Text or CellValue) for individual cells. The reason is that in a GridDataBoundGrid, there are no individual cell styles stored. The only datastore for the individual cells in the bound datasource, and it only has the CellValue available. Thus, you can set CellValue using indexers, but nothing else. For a GridControl, this is not a problem (unless you are using the GridControl virtually), but it is with a GridDataboundGrid.
If you want to provide Tag objects on individual cells in a GridDataBoundGrid, then you would have to create some data store (HashTable, ArrayList, ???) to hold these objects basaed on row/col. Then you could handle GridDataBoundGrid.Model.QueryCellInfo, and in your handler set e.Style.Tag based on the values of e.RowIndex and e.ColIndex.