Infragistics(R) NetAdvantage(R) Windows Forms
HeaderStyle Property
See Also  Example E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace > UltraGridOverride Class : HeaderStyle Property

Gets/sets the visual style of the column headers. Setting this property will also determine the visual style of the row selectors. The visual style of the row selectors can be specified with the RowSelectorStyle property.

Syntax

Visual Basic (Declaration) 
Public Property HeaderStyle As Infragistics.Win.HeaderStyle
C# 
public Infragistics.Win.HeaderStyle HeaderStyle {get; set;}

Example

This snippet shows how you can customize the visual style of the grid's column headers and row selectors.

Visual BasicCopy Code
Private Sub SetupGrid()   
   ' Set the HeaderStyle to 'WindowsXPCommand' so that the column headers and row selectors will 
   ' have a 3D look with an orange hottracking border on all sides.
   '
   Me.ultraGrid1.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.WindowsXPCommand
   
   ' Make sure that the row selectors are displayed.
   '
   Me.ultraGrid1.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.True
   
   ' You can override the style set on the HeaderStyle property by explicitly setting the 
   ' RowSelectorStyle property.  In this case, the row selectors will display the 'XPThemed'
   ' style while the column headers use the 'WindowsXPCommand' style.
   '
   Me.ultraGrid1.DisplayLayout.Override.RowSelectorStyle = Infragistics.Win.HeaderStyle.XPThemed
End Sub
C#Copy Code
private void SetupGrid()
{
	// Set the HeaderStyle to 'WindowsXPCommand' so that the column headers and row selectors will 
	// have a 3D look with an orange hottracking border on all sides.
	//
	this.ultraGrid1.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.WindowsXPCommand;

	// Make sure that the row selectors are displayed.
	//
	this.ultraGrid1.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.True;

	// You can override the style set on the HeaderStyle property by explicitly setting the 
	// RowSelectorStyle property.  In this case, the row selectors will display the 'XPThemed'
	// style while the column headers use the 'WindowsXPCommand' style.
	//
	this.ultraGrid1.DisplayLayout.Override.RowSelectorStyle = Infragistics.Win.HeaderStyle.XPThemed;
}

See Also