行の自動プレビュー領域は、行の全体幅の行の下に表示される空の領域です。この領域は、UltraGridRow オブジェクトの Description プロパティで決定される時に行の説明のテキストを表示するために使用できます。
AutoPreviewEnabled プロパティは、指定されたバンドの行に AutoPreview 領域を表示できるかどうかを決定します。AutoPreview を有効にすると、UltraGridRow オブジェクトの AutoPreviewHidden プロパティを False に設定することで、その行の AutoPreview 領域を表示できます。
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Imports System.Diagnostics Private Sub Button25_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button25.Click ' Set the AutoPreviewEnabled to enable row previews. Me.ultraGrid1.DisplayLayout.Bands(0).AutoPreviewEnabled = True Me.ultraGrid1.DisplayLayout.Bands(0).AutoPreviewField = "Address" Dim row1 As UltraGridRow = Me.ultraGrid1.Rows(0) Dim row2 As UltraGridRow = Me.ultraGrid1.Rows(1) ' You can hide auto preview for a specific row by setting AutoPreviewHidden to true. row1.AutoPreviewHidden = True ' AutoPreviewEnabled returns whether the auto preview will be shows on the row or not. ' Write out for row 0 and row 1 to show how setting AutoPreviewHidden to true effects ' the AutoPreviewEnabled. Debug.WriteLine("Row 1 AutoPreviewEnabled = " & row1.AutoPreviewEnabled) Debug.WriteLine("Row 2 AutoPreviewEnabled = " & row2.AutoPreviewEnabled) End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void button25_Click(object sender, System.EventArgs e) { // Set the AutoPreviewEnabled to enable row previews. this.ultraGrid1.DisplayLayout.Bands[0].AutoPreviewEnabled = true; this.ultraGrid1.DisplayLayout.Bands[0].AutoPreviewField = "Address"; UltraGridRow row1 = this.ultraGrid1.Rows[0]; UltraGridRow row2 = this.ultraGrid1.Rows[1]; // You can hide auto preview for a specific row by setting AutoPreviewHidden to true. row1.AutoPreviewHidden = true; // AutoPreviewEnabled returns whether the auto preview will be shows on the row or not. // Write out for row 0 and row 1 to show how setting AutoPreviewHidden to true effects // the AutoPreviewEnabled. Debug.WriteLine( "Row 1 AutoPreviewEnabled = " + row1.AutoPreviewEnabled ); Debug.WriteLine( "Row 2 AutoPreviewEnabled = " + row2.AutoPreviewEnabled ); }