バージョン

UltraGridBand クラス

関連するデータ列のセットを表すオブジェクト。
シンタックス
'宣言
 
Public Class UltraGridBand 
   Inherits Infragistics.Shared.KeyedSubObjectBase
   Implements Infragistics.Shared.IKeyedSubObject, Infragistics.Shared.IKeyedSubObjectEx, Infragistics.Win.Layout.ILayoutGroup 
public class UltraGridBand : Infragistics.Shared.KeyedSubObjectBase, Infragistics.Shared.IKeyedSubObject, Infragistics.Shared.IKeyedSubObjectEx, Infragistics.Win.Layout.ILayoutGroup  
解説

UltraGridBand オブジェクトは関連する列のセットを UltraGridUltraCombo または UltraDropDown コントロールで表します。ただし、フラットデータの場合は 1 つのバンドしか存在しないのに対し、階層データを持つグリッドの場合は複数のバンドを持ちます。

          Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged

          Dim band As Infragistics.Win.UltraWinGrid.UltraGridBand

          band = Me.UltraGrid1.DisplayLayout.Bands(0)

          band.AddButtonCaption = "Customers"
          band.AddButtonToolTipText = "Adds a new Customer record."
          band.AutoPreviewEnabled = False
          band.AutoPreviewField = ""
          band.AutoPreviewIndentation = 15
          band.AutoPreviewMaxLines = 3
          band.ColHeadersVisible = True
          band.ColHeaderLines = 2
          band.HeaderVisible = True
          band.ScrollTipField = "Cust_ID"
          band.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.InsetSoft

          band.CardView = True
          band.CardSettings.CaptionField = "Name"
          band.CardSettings.AllowLabelSizing = True
          band.CardSettings.AllowSizing = True
          band.CardSettings.Style = Infragistics.Win.UltraWinGrid.CardStyle.MergedLabels
          band.CardSettings.ShowCaption = True
          band.CardSettings.AutoFit = True

          End Sub
        

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

  Private Sub Button25_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button25.Click

      Dim band As UltraGridBand = Me.UltraGrid1.DisplayLayout.Bands(0)

      ' Set the AutoPreviewEnabled to enable row previews.
      band.AutoPreviewEnabled = True

      ' Set the AutoPrevieField to the field contents of which will be  displayed
      ' in the row preview.
      band.AutoPreviewField = "Address"

      ' Indent the text in row previews by 5 pixels
      band.AutoPreviewIndentation = 5

      ' Allow the row previews to display up to 4 lines of text if the text is 
      ' multiline.
      band.AutoPreviewMaxLines = 4

      ' Change how the row preview will look by setting RowPreviewAppearance 
      ' off the override.
      band.Override.RowPreviewAppearance.BackColor = Color.DarkBlue
      band.Override.RowPreviewAppearance.ForeColor = Color.LightYellow

      ' You can set the row preview appearance on per row basis overriding the
      ' settings on the Override.RowPreviewAppearance.
      Me.UltraGrid1.Rows(0).PreviewAppearance.BackColor = Color.Red

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

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

	UltraGridBand band = this.ultraGrid1.DisplayLayout.Bands[0];
	 
	// Set the AutoPreviewEnabled to enable row previews.
	band.AutoPreviewEnabled = true;	
	 
	// Set the AutoPrevieField to the field contents of which will be  displayed
	// in the row preview.
	band.AutoPreviewField = "Address";
	 
	// Indent the text in row previes by 5 pixels
	band.AutoPreviewIndentation = 5;

	// Allow the row previews to display upto 4 lines of text if the text is 
	// multiline.
	band.AutoPreviewMaxLines = 4;
	 
	// Change how the row preview will look by setting RowPreviewAppearance 
	// off the override.
	band.Override.RowPreviewAppearance.BackColor = Color.DarkBlue;
	band.Override.RowPreviewAppearance.ForeColor = Color.LightYellow;

	// You can set the row preview appearance on per row basis overrideing the
	// settings on the Override.RowPreviewAppearance.
	this.ultraGrid1.Rows[0].PreviewAppearance.BackColor = Color.Red;

}
参照