Actually, I think Excel colors the headers instead of showing an icon.
But you can do either, coloring is a simpler as you do not have to manage an icon and draw it.
You can use these events to handle colring teh current header row/col.
private void gridControl1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
if((e.ColIndex == 0 && e.RowIndex == this.gridControl1.CurrentCell.RowIndex)
|| (e.RowIndex == 0 && e.ColIndex == this.gridControl1.CurrentCell.ColIndex))
{
e.Style.BackColor = Color.Orange;
e.Style.Themed = false; //so color works on themed headers
}
}
private void gridControl1_CurrentCellMoved(object sender, GridCurrentCellMovedEventArgs e)
{
this.gridControl1.RefreshRange(GridRangeInfo.Col(0));
this.gridControl1.RefreshRange(GridRangeInfo.Row(0));
}
If you want to use an icon, instead of PrepareViewStyleInfo, you can handle the CellDrawn event. There if it is a current row header, draw your icon. You would still need the CurrentCellMoved event to force the headers to be redrawn.