I have a grid with a lot of repetitive cell values which clutter up the display. It's easy enough to handle PrepareViewStyleInfo and set the TextColor equal to the BackColor. But the user needs to be able to edit the values, so I'm trying to force the TextColor back to Black inside a CurrentCellChanging handler.
Problem is, I have no idea how to get at the cell colors from there. Usually, they're only accessible, I think, from methods that supply a GridStyleInfo object.
ADAdministrator Syncfusion Team August 12, 2003 12:59 AM
One comment is that if you 'set' the color in PrepareViewStyleInfo, this will step on any other setting you may do (unless it is done later than PrepareViewStyleInfo).
So, I would suggest you set both the non-editing color and editing color in PrepareViewStyleInfo.
If you want the color in CurrentCellChanging, then you would normally use an indexer on the grid to get the style for the cell. You would use grid.CurrentCell.RowIndex and grid.CurrentCell.ColIndex to specifiy the indexes.