Infragistics(R) NetAdvantage(R) Windows Forms
HeaderClickAction Enumeration
Example  See Also  E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace : HeaderClickAction Enumeration

Used to specify how a column or group header should react to being clicked.

Syntax

Visual Basic (Declaration) 
Public Enum HeaderClickAction 
   Inherits System.Enum
C# 
public enum HeaderClickAction : System.Enum 

Members

MemberDescription
Default Use Default. The setting of the object's parent will be used (or 'Select' if not parent is set to default).
ExternalSortMultiSame as SortMulti except with ExternalSortMulti UltraGrid won't perform the sort itself. This is useful if you want to sort externally through the data source. You can hook into the UltraGridBase.AfterSortChange event and apply the sort to the external data source.
ExternalSortSingleSame as SortSingle except with ExternalSortSingle UltraGrid won't perform the sort itself. This is useful if you want to sort externally through the data source. You can hook into the UltraGridBase.AfterSortChange event and apply the sort to the external data source.
Select Select. Selects the column or group (based on the setting of the SelectTypeCol property).
SortMulti Multiple Selection Sort. Changes the sort indicator for the column. If the shift key is pressed does not clear other columns sort indicators.
SortSingle Single Selection Sort. Changes the sort indicator for the column after clearing all other columns' sort indicators.

Example

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

Visual BasicCopy Code
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button50_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button50.Click

      ' HeaderClickAction indicates the action that the UltraGrid should take when a column
      ' header is clicked. Select causes the UltraGrid to select the column and SortMulti or
      ' SortSingle causes it to sort the column. Default is SortMulti in OutLookGroupBy 
      ' view style and Select otherwise.

      ' Set the HeaderClickAction on the layout's override. 
      Me.ultraGrid1.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortMulti

      ' 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.HeaderClickAction = HeaderClickAction.Select

  End Sub
C#Copy Code
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

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

	// HeaderClickAction indicates the action that the UltraGrid should take when a column
	// header is clicked. Select causes the UltraGrid to select the column and SortMulti or
	// SortSingle causes it to sort the column. Default is SortMulti in OutLookGroupBy 
	// view style and Select otherwise.

	// Set the HeaderClickAction on the layout's override. 
	this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortMulti;

	// 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.HeaderClickAction = HeaderClickAction.Select;

}

See Also