Problems changing text color

I´m using GridDataBoundGrid and i need to change the color of the text of a cell depending of the result of a condition evaluated on the event CurrentCellDeactivated. I have modified one of the samples content in the Essential Suite. In that example, (that use a ControlGrid instead of a GridDataBoundGrid) inside the method triggered by the event CurrentCellDeactivated, i´m able to modify the color of the text of the cell just by using this sentence: mySyncfussiongrid[currentCell.RowIndex,currentCell.ColIndex].TextColor = Color.Red; However, when i use the same sentence in my own code using a GridDataBoundGrid, the color of the text don´t change (but anyway i can modify the text using the Text property). Is there any problem chaging the color of the GridDataBoundGrid? I mean, Is there any other way to modify the color of the text? Thanks.

1 Reply

AD Administrator Syncfusion Team August 5, 2004 11:11 AM UTC

You cannot use an indexer on a GridDataBoundGrid to change any style property other than the cell value (which is the only thing your datasource holds). To change the color of a single cell in a GridDataBoundGrid, you need to use the PrepareViewStyleInfo event ot do it dynamcially. Here is a KB link. http://www.syncfusion.com/Support/article.aspx?id=560

Loader.
Up arrow icon