バージョン

Header プロパティ (UltraGridColumn)

列に関連付けられているHeaderオブジェクトを返します。このプロパティは実行時には読み取り専用です。このプロパティは設計時には使用できません。
シンタックス
'宣言
 
Public ReadOnly Property Header As ColumnHeader
public ColumnHeader Header {get;}
解説

オブジェクトの Header プロパティは、Header オブジェクトによって定義された列またはグループ ヘッダーを参照します。Header プロパティを使用すると、指定した Header オブジェクトのプロパティにアクセスしたり、Header オブジェクトへの参照を返すことができます。

ヘッダー オブジェクトは、列またはグループについての情報を指定する列ヘッダーまたはグループ ヘッダーを表し、列またはグループの移動、交換、ソートなどの機能のインターフェイスとしても機能できます。グループ ヘッダーにはひとつのヘッダーの下に複数の列を集めるために機能する追加の機能があります。

Header プロパティは、オブジェクトと関連付けられたヘッダーへのアクセスを提供します。UIElement オブジェクトの Header プロパティにアクセスする時など、場合によっては、ヘッダーのタイプが曖昧です。Header プロパティによって返される Header オブジェクトの Type プロパティを使用して、ヘッダーが列またはグループに属しているかどうかを決定することができます。

使用例
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button41_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button41.Click

      ' At the top level of the object hierarchy is the UltraGrid.
      Dim grid As UltraGridBase = Me.UltraGrid1

      ' Then is the layout.
      Dim layout As UltraGridLayout = grid.DisplayLayout

      ' Bands property returns the collection of bands. A band is analogous to a table in the data structure.
      ' Each band is associated with a table in the data source.
      Dim bands As BandsCollection = layout.Bands

      ' Get the first band, which is the  top-most band in case you had multple bands.
      Dim band As UltraGridBand = bands(0)

      ' Columns property off UltraGridBand returns the collection of columns associated with the band.
      Dim columns As ColumnsCollection = band.Columns

      ' You can get a particular column using the column name.
      Dim column As UltraGridColumn = columns("CustomerID")

      ' You can access the Header object associated with the column using Header property.
      Dim colHeader As Infragistics.Win.UltraWinGrid.ColumnHeader = column.Header

      ' Rows property off the UltraGridBase returns the top most rows.
      Dim rows As RowsCollection = Me.UltraGrid1.Rows

      ' You can get a row by index.
      Dim row As UltraGridRow = rows(0)

      ' You can get a cell associated with a row and a column by using Cells property off the row.
      ' You can use a column object or a column key as illustrated below.
      Dim cell As UltraGridCell = row.Cells(column)   ' Using a column object.
      cell = row.Cells("CustomerID")   ' Using a column key.

      ' These objects also have properties that back-reference the object they belong to or are
      ' associated with. Following lines illustrate some of these properties.
      column = cell.Column        ' Get the column cell is associated with.
      row = cell.Row              ' Get the row cell is associated with.
      rows = row.ParentCollection ' Get the rows collection the row belongs to.
      column = colHeader.Column   ' Get the column associated with the ColumnHeader object.
      band = column.Band          ' Get the band associated with the column.
      band = row.Band             ' Get the band associated with the row.
      layout = column.Layout      ' Get the layout using a column.
      layout = band.Layout        ' Get the layout using a band.
      grid = layout.Grid          ' Get the grid using a band.
      grid = cell.Row.Band.Layout.Grid   ' Get the grid using a cell in a single statement.

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

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

	// At the top level of the object hierarchy is the UltraGrid.
	UltraGridBase grid = this.ultraGrid1;

	// Then is the layout.
	UltraGridLayout layout = grid.DisplayLayout;

	// Bands property returns the collection of bands. A band is analogous to a table in the data structure.
	// Each band is associated with a table in the data source.
	BandsCollection bands = layout.Bands;

	// Get the first band, which is the  top-most band in case you had multple bands.
	UltraGridBand band = bands[0];

	// Columns property off UltraGridBand returns the collection of columns associated with the band.
	ColumnsCollection columns = band.Columns;

	// You can get a particular column using the column name.
	UltraGridColumn column = columns["CustomerID"];

	// You can access the Header object associated with the column using Header property.
	Infragistics.Win.UltraWinGrid.ColumnHeader colHeader = column.Header;

	// Rows property off the UltraGridBase returns the top most rows.
	RowsCollection rows = this.ultraGrid1.Rows;

	// You can get a row by index.
	UltraGridRow row = rows[0];

	// You can get a cell associated with a row and a column by using Cells property off the row.
	// You can use a column object or a column key as illustrated below.
	UltraGridCell cell = row.Cells[ column ]; // Using a column object.
	cell = row.Cells[ "CustomerID" ];         // Using a column key.

	// These objects also have properties that back-reference the object they belong to or are
	// associated with. Following lines illustrate some of these properties.
	column = cell.Column;			// Get the column cell is associated with.
	row	   = cell.Row;			// Get the row cell is associated with.
	rows   = row.ParentCollection;  		// Get the rows collection the row belongs to.
	column = colHeader.Column;		// Get the column associated with the ColumnHeader object.
	band   = column.Band;			// Get the band associated with the column.
	band   = row.Band;			// Get the band associated with the row.
	layout = column.Layout;			// Get the layout using a column.
	layout = band.Layout;			// Get the layout using a band.
	grid   = layout.Grid;			// Get the grid using a band.
	grid   = cell.Row.Band.Layout.Grid; 	// Get the grid using a cell in a single statement.

}
参照