This project is read-only.

Selection ForeColor

Feb 25, 2013 at 6:17 PM
Hi all,
I'm trying to make a grid that has a large amount of custom cell back/fore colors look a bit more presentable with regard to highlighting.

Basically I'd like to have each cell update when it is highlighted and change both the fore and background colors.

Is this possible? If so, what's the most efficient way of doing this.

Cheers,
Nick Spencer
Mar 13, 2013 at 3:16 PM
You want to change some visual properties of the cell you must use the View class.

SourceGrid.Cells.Views.Cell viewCell = new SourceGrid.Cells.Views.Cell();
viewCell.ForeColor = Color.Yellow;
viewCell.BackColor = Color.SteelBlue;
grid1[x, y].View = viewCell;
Mar 13, 2013 at 3:28 PM
Thanks Micronovo,
That's exactly what I ended up doing. And I captured the selection changed event and adjusted the selected cells with the method you described above.

I appreciate the help! I should have marked this solved.