Version

IsDisplayLayout Property

Returns true if this is the grid's main display layout.
Syntax
'Declaration
 
Public ReadOnly Property IsDisplayLayout As Boolean
public bool IsDisplayLayout {get;}
Remarks

Since you may want to apply different layouts for display and printing, this property indicates that this layout is being used for display purposes. Use IsPrintLayout to determine if the layout is being used for printing.

Example
Following code writes out which kind of layout is being initialized. A Layout can be either a print layout or a display layout. Print layout is the UltraGridLayout object that's used when printing. Display layout is the UltraGridLayout that's used for drawing on the screen.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics

   Private Sub UltraGrid1_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles ultraGrid1.InitializeLayout

       ' Following code writes out which kind of layout is being initialized. A Layout can be
       ' either a print layout or a display layout. Print layout is the UltraGridLayout object 
       ' that's used when printing. Display layout is the regular UltraGridLayout that's used 
       ' for drawing on the screen.

       If e.Layout.IsDisplayLayout Then
           Debug.WriteLine("The UltraGridLayout being initialized is a display layout.")

           ' Use background color of gray for the grid.
           e.Layout.Appearance.BackColor = Color.Gray
       ElseIf e.Layout.IsPrintLayout Then
           Debug.WriteLine("The UltraGridLayout being initialized is a print layout.")

           ' Use background color of white when printing.
           e.Layout.Appearance.BackColor = Color.White
       End If

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

private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{

	// Following code writes out which kind of layout is being initialized. A Layout can be
	// either a print layout or a display layout. Print layout is the UltraGridLayout object 
	// that's used when printing. Display layout is the regular UltraGridLayout that's used 
	// for drawing on the screen.

	if ( e.Layout.IsDisplayLayout )
	{
		Debug.WriteLine( "The UltraGridLayout being initialized is a display layout." );

		// Use background color of gray for the grid.
		e.Layout.Appearance.BackColor = Color.Gray;
	}
	else if ( e.Layout.IsPrintLayout )
	{	
		Debug.WriteLine( "The UltraGridLayout being initialized is a print layout." );

		// Use background color of white when printing.
		e.Layout.Appearance.BackColor = Color.White;
	}

}
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