Nothing in the code below changes the forecolor of the drop-downs.
private void HighlightRow(UltraGridRow gridRow, Color color, GradientStyle gradientStyle) { gridRow.Appearance.BackColor = color; gridRow.Appearance.ForeColor = Color.White; foreach (var gridRowCell in gridRow.Cells) if (gridRowCell.EditorComponent is UltraComboEditor) { gridRowCell.Appearance.ForeColor = Color.White; UltraComboEditor editor = gridRowCell.EditorComponent as UltraComboEditor; if (editor != null) { editor.Appearance.ForeColor = Color.White; } } }
Hello Kipp,
I have put together a sample project based on the code that you have provided, and I feel that there may be something else at play in your application, as by using an UltraComboEditor as the EditorComponent for a single column on my end and setting the row's Appearance.Forecolor, I am able to see that color showing through. As such, I can't really say that I can reproduce the behavior you are seeing.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version 18.1.20181.88 in Infragistics for Windows Forms 2018.1.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if you have any other questions or concerns on this matter.
UltraGridComboForecolorCase.zip
Thanks for looking at this Andrew.
The difference might be that in my grid the column's editor is not set, but rather the cell's editor is set to UltraComboBox.
I have modified the sample project that I had originally sent you to set the editor on the individual UltraGridCell elements instead of the column, but this does not seem to make a difference as I am still unable to reproduce the behavior you are seeing. For reference, I am attaching the updated sample project.
It will be helpful if you can modify this sample project such that it reproduces the behavior you are seeing or provide a small, isolated one of your own.
7002.UltraGridComboForecolorCase.zip
Thanks. I'll see if I can do that.
Are you trying to set the ForeColor on the cell? Or the items in the dropdown? It looks like you are talking about the cell.
Note that setting the Appearance on the editor will have no effect on the cell.
My guess is that the cell in this case is picking up the appearance of the selected item on the list. If you have applied an appearance to the list items, the cell may be using that appearance so that it matches the selected item. Your isl may be applying an appearance to the items in the combo instead of to the dropdown portion as a whole, in which case the solution would be to change the way the isl is styling the items.