|
- Is it possible to change one header cell backcolor or textcolor mannualy? I've seen thread 3947 but this changes all the header cells. |
GridControl Themes does not provide support to update the individual header cell background color since, the backcolor is updated based on the HeaderStyle. If you need to change the backcolor for individual cells, we would suggest that you to update the BackColor using QueryCellInfo event instead of themes. Please refer to the below UG link.
|
|
- When printing (GridPrintDocumentAdv) this grid with theme the header not respect the header theme colors. Is this normal? |
In order to update the header background color while printing the grid, the QueryCellInfo event can be used. Please make use of the below code and UG link.
Example code
private void GridControl1_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
if (this.gridControl1.PrintingMode)
{
//Column headers or Row headers
if (e.RowIndex == 0 || e.ColIndex == 0)
{
e.Style.BackColor = Color.Black;
e.Style.Borders.All = new GridBorder(GridBorderStyle.Solid, Color.Gray);
}
}
}
|
|
1- I can only change backgroud header cell if I ThemeEnable=False |
As per the GridControl current behavior, the background and foreground will be updated based on the theme name when the ThemesEnabled is true. We would suggest that you to disable the same to avail your own customized theme colos. |
|
2- I can't use QueryCellInfo event provably beacause I use a temp GridControl. The event doesn't start. My code is:
System.IO.MemoryStream strm = new System.IO.MemoryStream();
MyGrid.Model.SaveBinary(strm);
strm.Position = 0;
gridTmp = new GridControl(GridModel.LoadBinary(strm));
gridTmp.QueryCellInfo += new GridQueryCellInfoEventHandler(gridTmp_QueryCellInfo); |
We could understand the scenario and need some time to validate further on this to confirm whether is it a defect from our end. So we will update you the proper details on 06th April 2020. We appreciate your patience till then. |
|
I've add a new question about Office2016Black Theme:
- When a cell is .CellType = "DateTimePicker" both backcolor and textcolor are white when editing the cell. Is this normal? How can I change one color? |