'Declaration Public Overloads Sub CopyFrom( _ ByVal source As UltraGridLayout, _ ByVal propertyCategories As PropertyCategories _ )
public void CopyFrom( UltraGridLayout source, PropertyCategories propertyCategories )
Invoke this method to copy some or all of an existing UltraGridLayout object's property settings to another UltraGridLayout object. This method does not create a new UltraGridLayout object - it merely copies settings from one object to another.
Invoke the Clone method to make a copy of the current UltraGridLayout object. Clone returns a reference to an UltraGridLayout object, whereas this method does not.
Multiple categories can be copied by combining them using logical Or.
When specifying 256 (PropCatGeneral), the following property settings for the UltraGridLayout object are copied:
|
|
|
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub Button8_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button8.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.CopyFrom(Me.ultraGrid1.DisplayLayout, PropertyCategories.All) End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void button8_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.CopyFrom( this.ultraGrid1.DisplayLayout, PropertyCategories.All ); }
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