Home Forums WinForms controls Xceed Grid for WinForms Fixed Row Color

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #13924 |

    I am having bit of a problem with the properties of the FixedHeaderRow. I changed the font and BackColor of one of my columns, but wish the FixedHeaderRow to have it’s own colors and font.

    The columns I have not already set, do change to the font and BackColor I want. Is there a way to override the column settings I have done for the FixedHeaderRow?

    Example (the UIStyle of the grid is set to WindowsClassic);

    gridControl2.Columns[“C1”].Font = new Font( “”, 8 | 1 );
    gridControl2.Columns[“C1”].BackColor = Color.LightGray;

    foldersColumnManagerRow.Font = new Font(foldersColumnManagerRow.Font, FontStyle.Bold);
    foldersColumnManagerRow.BackColor = Color.DarkGray;
    gridControl2.FixedHeaderRows.Add( foldersColumnManagerRow );

    Imported from legacy forums. Posted by TVMed (had 2499 views)

    User (Old forums)
    Member
    Post count: 23064

    Yes, you can loop over the cells and set their BackColor. The rules are probably like this:
    – check for BackColor of cell
    – check for BackColor of column
    – check for BackColor of row<code>foreach(Cell cell in foldersColumnManagerRow) cell.BackColor = Color.DarkGray;</code>

    Imported from legacy forums. Posted by Tommy (had 159 views)

    User (Old forums)
    Member
    Post count: 23064

    Perfect, thank you.

    Imported from legacy forums. Posted by TVMed (had 3455 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.