I am wanting to change the color of top part of the grid where the .Text is displayed.
I don't want to change the background color of the main cell area or the column headers.
Set UltraGrid.UseAppStyling to false for the ones to which you don't want to apply it.
That work as I wanted!!
It did however applied it to all my grids on any forms. Which is not bad but I will just have to figure out how to apply it per grid.
Thanks,
using Infragistics.Win.UltraWinGrid;using Infragistics.Win.UltraWinEditors;using Infragistics.Win;using Infragistics.Win.AppStyling;using Infragistics.Win.AppStyling.Runtime;
.
// Remove borders for the caption areathis.grid.DisplayLayout.BorderStyleCaption = UIElementBorderStyle.None;
// Create a new libraryApplicationStyleLibrary library = new ApplicationStyleLibrary();
// Use AppStyling to change the colors of the caption area headerStyleSetSettings styleSet = library.StyleSets.Add("Default");AppearanceBase captionAppearance =styleSet.RoleStyles.GetStyle("GridCaption", true).States.GetState(RoleState.Normal, true).Appearance;
// Remember to suppress theming since otherwise the OS// draws the header, and the bacground color will not be applied.captionAppearance.ThemedElementAlpha = Alpha.Transparent;captionAppearance.BackColor = Color.Red;captionAppearance.ForeColor = Color.White;
// Update so that changes are immediately reflectedlibrary.UpdateStyleManager();