Version

PreviewAppearance Property

Returns or sets the Appearance object that controls the formatting of row's AutoPreview area.
Syntax
'Declaration
 
Public Property PreviewAppearance As Infragistics.Win.Appearance
public Infragistics.Win.Appearance PreviewAppearance {get; set;}
Remarks

The PreviewAppearance property provides access to the Appearance object being used to control the preview area of the UltraGridRow object. The Appearance object has properties that control settings such as color, borders, font, transparency, etc. For more information on how to use properties that end in "Appearance", consult the topic for the Appearance property.

You can also use the RowPreviewAppearance property of the UltraGridOverride object to control the settings of the row preview area. To determine the settings for a given row, use the ResolvePreviewAppearance method.

Example
Following code shows how one can enable and customize the Row Auto Preview functionality.

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;

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also