バージョン

Columns プロパティ (UltraGridBand)

バンドを構成する UltraGridColumns の ColumnsCollection を返します。このプロパティは読み取り専用です。
シンタックス
'宣言
 
Public ReadOnly Property Columns As ColumnsCollection
public ColumnsCollection Columns {get;}
解説

Columns プロパティは、バンドのすべての列を含むコレクションを返します。返されたコレクションには UltraGridColumn インスタンスが含まれます。ColumnsCollection.Add メソッドを使用してアンバインド列を追加できます。

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

  Private Sub Button9_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button9.Click

      ' Get the layout, a band, a column, a row and a cell for the demonstration purpose.
      Dim layout As UltraGridLayout = Me.ultraGrid1.DisplayLayout
      Dim band As UltraGridBand = layout.Bands(0)
      Dim column As UltraGridColumn = band.Columns(0)
      Dim row As UltraGridRow = Me.ultraGrid1.Rows(0)
      Dim cell As UltraGridCell = row.Cells(column)

      ' The way the UltraGrid resolves cell appearance is that objects at a lower level
      ' in the object model hierarchy have higher precedence than objects in higher level.
      ' For example, a cell has a higher precedence than its row. A row has a higher
      ' precedence than a column. The precedence order usually is cell, row, column, band,
      ' layout in decresing precedence order.

      ' Set grid-wide cell appearance by using the layout's Override.
      layout.Override.CellAppearance.BackColor = Color.Yellow

      ' You can override above settings for a a band by setting the 
      ' Override.CellAppearance on the band. This will have higher precedence than
      ' the layout.Override.
      band.Override.CellAppearance.BackColor = Color.Magenta

      ' You can override cell appearance on a column as well so cell-appearance settings
      ' on both the band and the layout will be ignored.
      column.CellAppearance.BackColor = Color.Red

      ' In the same manner, you can override cell-apperance for a row.
      row.CellAppearance.BackColor = Color.Green

      ' You can override the cell-appearance for individual cells.
      cell.Appearance.BackColor = Color.Blue

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

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

	// Get the layout, a band, a column, a row and a cell for the demonstration purpose.
	UltraGridLayout layout = this.ultraGrid1.DisplayLayout;
	UltraGridBand   band   = layout.Bands[0];
	UltraGridColumn column = band.Columns[0];
	UltraGridRow    row    = this.ultraGrid1.Rows[0];
	UltraGridCell    cell   = row.Cells[column];

	// The way the UltraGrid resolves cell appearance is that objects at a lower level
	// in the object model hierarchy have higher precedence than objects in higher level.
	// For example, a cell has a higher precedence than its row. A row has a higher
	// precedence than a column. The precedence order usually is cell, row, column, band,
	// layout in decresing precedence order.

	// Set grid-wide cell appearance by using the layout's Override.
	layout.Override.CellAppearance.BackColor = Color.Yellow;

	// You can override above settings for a a band by setting the 
	// Override.CellAppearance on the band. This will have higher precedence than
	// the layout.Override.
	band.Override.CellAppearance.BackColor = Color.Magenta;

	// You can override cell appearance on a column as well so cell-appearance settings
	// on both the band and the layout will be ignored.
	column.CellAppearance.BackColor = Color.Red;

	// In the same manner, you can override cell-apperance for a row.
	row.CellAppearance.BackColor = Color.Green;

	// You can override the cell-appearance for individual cells.
	cell.Appearance.BackColor = Color.Blue;

}
参照