バージョン

ViewStyleBand プロパティ

コントロールによって表示されるビューの種類を設定します。
シンタックス
'宣言
 
Public Property ViewStyleBand As ViewStyleBand
public ViewStyleBand ViewStyleBand {get; set;}
解説

UltraWinGrid の ViewStyleBand プロパティは、バンドがコントロール内でどのように配置されるかを決定します。バンドの配置は、コントロールがバインドされるレコードセットのタイプによっても異なります。フラット(階層的でない)レコードセットは、このプロパティの設定に関係なく単一のバンドのみで表示されます。

コントロールが階層的なレコードセットにバインドされている場合、階層的なデータのバンドを表示するためにスタイルの選択肢があります。単一バンドでデータを表示することを選択できます(この場合、階層の最上位レベルだけが表示されます)。水平表示を選択でき、バンドは列に区別され、データは左から右に分かれます。

垂直表示を選択することもでき、バンドは行のグループに区別され、アウトラインまたはツリー表示と同じようにインデントされます。

通常、垂直表示スタイルは小さい領域により多くのデータが収まり、水平表示スタイルは、階層のレベル間の分割をより明確にします。どのスタイルを選択するかは、アプリケーションの要件によって異なります。

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

  Private Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button4.Click

      ' Set the view style to OutlookGroupBy. Without it, group by box won't
      ' show up.
      Me.UltraGrid1.DisplayLayout.ViewStyleBand = ViewStyleBand.OutlookGroupBy

      ' Set the group-by-box style to Compact to save space.
      Me.UltraGrid1.DisplayLayout.GroupByBox.Style = GroupByBoxStyle.Compact

      ' Set the appearance of the group-by-box.
      Me.UltraGrid1.DisplayLayout.GroupByBox.Appearance.BackColor = Color.White

      ' Set the group-by-box prompt. This text shows up in the group-by-box when
      ' there are no group-by columns.
      Me.UltraGrid1.DisplayLayout.GroupByBox.Prompt = "Drag and drop a column to group by that column."

      ' Set the back color and fore color of the prompt area.
      'Me.UltraGrid1.DisplayLayout.GroupByBox.PromptAppearance.BackColor = Color.LightGray
      Me.UltraGrid1.DisplayLayout.GroupByBox.PromptAppearance.ForeColor = Color.Maroon

      ' Set the border style to InsetSoft.
      Me.UltraGrid1.DisplayLayout.GroupByBox.BorderStyle = UIElementBorderStyle.InsetSoft

      ' Configure the buttons associated with grouped-by columns. When a column
      ' is dragged and dropped in the group-by-box, the rows get grouped by the
      ' column and the column becomes a group-by column.
      '
      Me.UltraGrid1.DisplayLayout.GroupByBox.ButtonBorderStyle = UIElementBorderStyle.RaisedSoft

      ' Change the band labels. By setting it to
      ' All, grid will show lables for all the bands.
      Me.UltraGrid1.DisplayLayout.GroupByBox.ShowBandLabels = ShowBandLabels.All

      ' Configure the look of the band labels.
      Me.UltraGrid1.DisplayLayout.GroupByBox.BandLabelBorderStyle = UIElementBorderStyle.Solid
      Me.UltraGrid1.DisplayLayout.GroupByBox.BandLabelAppearance.BackColor = Color.DarkBlue
      Me.UltraGrid1.DisplayLayout.GroupByBox.BandLabelAppearance.ForeColor = Color.LightYellow

      ' Configure the way button connectors look
      Me.UltraGrid1.DisplayLayout.GroupByBox.ButtonConnectorStyle = UIElementBorderStyle.Dotted
      Me.UltraGrid1.DisplayLayout.GroupByBox.ButtonConnectorColor = Color.Maroon

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

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

	// Set the view style to OutlookGroupBy. Without it, group by box won't
	// show up.
	this.ultraGrid1.DisplayLayout.ViewStyleBand = ViewStyleBand.OutlookGroupBy;

	// Set the group-by-box style to Compact to save space.
	this.ultraGrid1.DisplayLayout.GroupByBox.Style = GroupByBoxStyle.Compact;

	// Set the appearance of the group-by-box.
	this.ultraGrid1.DisplayLayout.GroupByBox.Appearance.BackColor = Color.White;

	// Set the group-by-box prompt. This text shows up in the group-by-box when
	// there are no group-by columns.
	this.ultraGrid1.DisplayLayout.GroupByBox.Prompt = "Drag and drop a column to group by that column.";

	// Set the back color and fore color of the prompt area.
	//this.ultraGrid1.DisplayLayout.GroupByBox.PromptAppearance.BackColor = Color.LightGray;
	this.ultraGrid1.DisplayLayout.GroupByBox.PromptAppearance.ForeColor = Color.Maroon;

	// Set the border style to InsetSoft.
	this.ultraGrid1.DisplayLayout.GroupByBox.BorderStyle = UIElementBorderStyle.InsetSoft;
	
	// Configure the buttons associated with grouped-by columns. When a column
	// is dragged and dropped in the group-by-box, the rows get grouped by the
	// column and the column becomes a group-by column.
	//
	this.ultraGrid1.DisplayLayout.GroupByBox.ButtonBorderStyle = UIElementBorderStyle.RaisedSoft;

	// Change the which band labels get shown in the group-by-box. By setting it to
	// All, grid will show lables for all the bands.
	this.ultraGrid1.DisplayLayout.GroupByBox.ShowBandLabels = ShowBandLabels.All;
	
	// Configure the look of the band labels.
	this.ultraGrid1.DisplayLayout.GroupByBox.BandLabelBorderStyle = UIElementBorderStyle.Solid;
	this.ultraGrid1.DisplayLayout.GroupByBox.BandLabelAppearance.BackColor = Color.DarkBlue;
	this.ultraGrid1.DisplayLayout.GroupByBox.BandLabelAppearance.ForeColor = Color.LightYellow;
	
	// Configure the way button connectors look
	this.ultraGrid1.DisplayLayout.GroupByBox.ButtonConnectorStyle = UIElementBorderStyle.Dotted;
	this.ultraGrid1.DisplayLayout.GroupByBox.ButtonConnectorColor = Color.Maroon;

}
参照