OnFocusEntered and confusion

Nov 17, 2013 at 2:03 AM
Edited Nov 17, 2013 at 6:22 AM
Hi,
after spending a sleepless night, I decided to ask for help.
I have a grid with n rows and n columns.
I wish the event "OnFocusEntered" in cell (eg 6, 4) go to influence HeaderRow [6] and HeaderColumns [4].
I wrote this code ...
public class CellFocus : SourceGrid.Cells.Controllers.ControllerBase
{
    public override void OnFocusEntered(SourceGrid.CellContext sender, EventArgs e)
    {
        base.OnFocusEntered(sender, e);
        
        SourceGrid.Cells.Views.ColumnHeader colFocusEnter = new SourceGrid.Cells.Views.ColumnHeader();
        colFocusEnter.Font = new Font(sender.Grid.Font, FontStyle.Bold);

        int row = sender.Position.Row;
        int col = sender.Position.Column;
        
        //
        // this does not work
        sender.Grid[row, 0].View = colFocusEnter;
        sender.Grid[0, col].View = colFocusEnter;
        // this does not work
        //
    }
}
Greetings,
Emanuele.