Version

Load(UltraGridLayout,PropertyCategories) Method

Loads the current layout with attributes of the passed in UltraGridLayout, using the specified property categories.
Syntax
'Declaration
 
Public Overloads Sub Load( _
   ByVal newLayout As UltraGridLayout, _
   ByVal propertyCategories As PropertyCategories _
) 

Parameters

newLayout
The layout with the property settings to be loaded.
propertyCategories
Specifies which properties of the layout to load.
Remarks

Invoking this method loads a Layout using another UltraGridLayout object as the source.

When specifying 256 (PropCatGeneral), the following property settings for the Layout object are loaded:

  • AddNewBox
  • AlphaBlendEnabled
  • BorderStyle
  • BorderStyleCaption
  • Caption
  • Enabled
  • EstimatedRows
  • Font
  • InterBandSpacing
  • MaxColScrollRegions
  • MaxRowScrollRegions
  • Override
  • RowConnectorColor
  • RowConnectorStyle
  • ScrollBars
  • TabNavigation
  • TagVariant
  • ViewStyle
  • ViewStyleBand

Multiple Layout categories can be copied by combining them using logical Or.

The Clone and CopyFrom methods can be invoked to make a duplicate of a layout.

Example
Following code shows how to copy a layout to another layout using CopyFrom method.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button7_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button7.Click

      ' Setup the display layout of ultraGrid1.
      Me.ultraGrid1.DisplayLayout.Appearance.BackColor = Color.Gray
      Me.ultraGrid1.DisplayLayout.Override.CellAppearance.BackColor = Color.LightSkyBlue

      ' Now load the layout of ultraGrid2 with the layout of ultraGrid1 so all the settings
      ' on ultraGrid1's layout get copied to ultraGrid2'2 layout.
      Me.ultraGrid2.DisplayLayout.Load(Me.ultraGrid1.DisplayLayout, PropertyCategories.All)

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

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

	// Setup the display layout of ultraGrid1.
	this.ultraGrid1.DisplayLayout.Appearance.BackColor = Color.Gray;
	this.ultraGrid1.DisplayLayout.Override.CellAppearance.BackColor = Color.LightSkyBlue;

	// Now load the layout of ultraGrid2 with the layout of ultraGrid1 so all the settings
	// on ultraGrid1's layout get copied to ultraGrid2'2 layout.
	this.ultraGrid2.DisplayLayout.Load( this.ultraGrid1.DisplayLayout, PropertyCategories.All );

}
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