Version

HeaderAppearance Property

Returns or sets the Appearance object used to set the header formatting attributes.
Syntax
'Declaration
 
Public Property HeaderAppearance As Infragistics.Win.AppearanceBase
public Infragistics.Win.AppearanceBase HeaderAppearance {get; set;}
Remarks

The HeaderAppearance property is used to specify the appearance of all the headers in a band or the grid. When you assign an Appearance object to the HeaderAppearance property, the properties of that object will be applied to all the column or group headers associated with the object that you specified. You can use the HeaderAppearance property to examine or change any of the appearance-related properties that are currently assigned to headers, for example:

UltraWinGrid1.Override.HeaderAppearance.BackColor = vbBlack

Because you may want the headers to look different at different levels of a hierarchical record set, HeaderAppearance is a property of the UltraGridOverride object. This makes it easy to specify different header appearances for each band by assigning each UltraGridBand object its own UltraGridOverride object. If a band does not have an override assigned to it, the control will use the override at the next higher level of the override hierarchy to determine the properties for that band. In other words, any band without an override will use its parent band's override, and the top-level band will use the grid's override. Therefore, if the top-level band does not have its override set, the headers of that band will use the grid-level setting of HeaderAppearance.

You can override the HeaderAppearance setting for specific headers by setting the Appearance property of the Header object directly. The header will always use the values of its own Appearance object before it will use the values inherited from the Appearance object specified by the HeaderAppearance property of the band it occupies.

Example
Following code sets the HeaderAppearance on the layout's override and a band's override.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button51_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button51.Click

      ' Set the HeaderAppearance on the layout's override. HeaderAppearance applies to
      ' column headers.
      Me.ultraGrid1.DisplayLayout.Override.HeaderAppearance.BackColor = Color.SkyBlue

      ' You can override that grid-wide setting for a particular band by setting it on the
      ' override of that band.
      Me.UltraGrid1.DisplayLayout.Bands(1).Override.HeaderAppearance.BackColor = Color.Red

      ' You can also set the header appearance on individual column headers.
      Me.ultraGrid1.DisplayLayout.Bands(0).Columns(0).Header.Appearance.BackColor = Color.Red

  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void button51_Click(object sender, System.EventArgs e)
{

	// Set the HeaderAppearance on the layout's override. HeaderAppearance applies to
	// column headers.
	this.ultraGrid1.DisplayLayout.Override.HeaderAppearance.BackColor = Color.SkyBlue;

	// You can override that grid-wide setting for a particular band by setting it on the
	// override of that band.
	this.ultraGrid1.DisplayLayout.Bands[1].Override.HeaderAppearance.BackColor = Color.Red;

	// You can also set the header appearance on individual column headers.
	this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Header.Appearance.BackColor = Color.Red;

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also