Version

Initialize(Int32,Int32,Int32,Int32,Single,Single,LabelPosition,Int32) Method

Initializes the row layout info with the passed in arguments.
Syntax
'Declaration
 
Public Overloads Sub Initialize( _
   ByVal originX As Integer, _
   ByVal originY As Integer, _
   ByVal spanX As Integer, _
   ByVal spanY As Integer, _
   ByVal weightX As Single, _
   ByVal weightY As Single, _
   ByVal labelPosition As LabelPosition, _
   ByVal labelSpan As Integer _
) 
public void Initialize( 
   int originX,
   int originY,
   int spanX,
   int spanY,
   float weightX,
   float weightY,
   LabelPosition labelPosition,
   int labelSpan
)

Parameters

originX
The origin X
originY
The origin Y
spanX
The span X
spanY
The span X
weightX
0.0 is the default.
weightY
0.0 is the default.
labelPosition
The label position.
labelSpan
1 is the default.
Example
Following code sets up a simple three column row-layout.

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

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ' Create a data table with 3 columns.
        Dim dt As DataTable = New DataTable("Table1")
        dt.Columns.Add("Col1", GetType(String))
        dt.Columns.Add("Col2", GetType(String))
        dt.Columns.Add("Col3", GetType(String))

        ' Fill the data table with some random data.
        Dim i As Integer
        For i = 0 To 100 - 1
            dt.Rows.Add(New String() {"Test" & i + 1, "Test" & i + 2, "Test" & i + 3})
        Next

        ' Set the grid's data source to the data table.
        Me.UltraGrid1.DataSource = dt

        Dim band As UltraGridBand = Me.UltraGrid1.DisplayLayout.Bands("Table1")

        ' Get the columns of Table1 band in the UltraGrid.
        Dim gridColumns As ColumnsCollection = band.Columns

        ' Turn on the row layout functionality for Table1 band.
        band.RowLayoutStyle = RowLayoutStyle.ColumnLayout

        ' Setup the row-layout.			
        '  OriginX  OriginY  SpanX  SpanY
        gridColumns("Col1").RowLayoutColumnInfo.Initialize(0, 0, 1, 1)
        gridColumns("Col2").RowLayoutColumnInfo.Initialize(1, 0, 1, 1)
        gridColumns("Col3").RowLayoutColumnInfo.Initialize(0, 1, 2, 1)

        ' Allow for multiline text in the Col3 cells.
        gridColumns("Col3").RowLayoutColumnInfo.Column.CellMultiLine = DefaultableBoolean.True

        ' Assign a non-zero positive WeightX to Col1 so that any extra
        ' horizontal space is distributed to that column. For example,
        ' AutoFitColumns is turned on and the width of the grid is
        ' bigger than what's required to fit all the columns, extra
        ' space will be assigned to this column.
        gridColumns("Col1").RowLayoutColumnInfo.WeightX = 1.0F

        ' Assign a non-zero positive WeightY to Col3 so that any extra
        ' vertical space is distribute to that column. For example,
        ' if the row height is set to a height bigger than what's
        ' required to fit all columns then extra space is assigned to
        ' this column.
        gridColumns("Col3").RowLayoutColumnInfo.WeightY = 1.0F

        ' Set the default row height to 200 and turn on the auto-fit 
        ' columns to demonstrate the effect that WeightX and WeightY
        ' properties have.
        Me.UltraGrid1.DisplayLayout.Override.DefaultRowHeight = 100
        Me.UltraGrid1.DisplayLayout.AutoFitColumns = True

        band.Override.RowSpacingAfter = 5
    End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

		private void Form1_Load(object sender, System.EventArgs e)
		{
			// Create a data table with 3 columns.
			DataTable dt = new DataTable( "Table1" );
			dt.Columns.Add( "Col1", typeof( string ) );
			dt.Columns.Add( "Col2", typeof( string ) );
			dt.Columns.Add( "Col3", typeof( string ) );

			// Fill the data table with some random data.
			for ( int i = 0; i < 100; i++ )
				dt.Rows.Add( new string[] { "Test" + i + 1, "Test" + i + 2, "Test" + i + 3 } );

			// Set the grid's data source to the data table.
			this.ultraGrid1.DataSource = dt;

			UltraGridBand band = this.ultraGrid1.DisplayLayout.Bands["Table1"];

			// Get the columns of Table1 band in the UltraGrid.
			ColumnsCollection gridColumns = band.Columns;

			// Turn on the row layout functionality for Table1 band.
			band.RowLayoutStyle = RowLayoutStyle.ColumnLayout;

			// Setup the row-layout.			
			                                          //  OriginX  OriginY  SpanX  SpanY
			gridColumns["Col1"].RowLayoutColumnInfo.Initialize( 0,       0,     1,     1 );
			gridColumns["Col2"].RowLayoutColumnInfo.Initialize( 1,       0,     1,     1 );
			gridColumns["Col3"].RowLayoutColumnInfo.Initialize( 0,       1,     2,     1 );

			// Allow for multiline text in the Col3 cells.
			gridColumns["Col3"].RowLayoutColumnInfo.Column.CellMultiLine = DefaultableBoolean.True;
			
			// Assign a non-zero positive WeightX to Col1 so that any extra
			// horizontal space is distributed to that column. For example,
			// AutoFitColumns is turned on and the width of the grid is
			// bigger than what's required to fit all the columns, extra
			// space will be assigned to this column.
			gridColumns["Col1"].RowLayoutColumnInfo.WeightX = 1.0f;

			// Assign a non-zero positive WeightY to Col3 so that any extra
			// vertical space is distribute to that column. For example,
			// if the row height is set to a height bigger than what's
			// required to fit all columns then extra space is assigned to
			// this column.
			gridColumns["Col3"].RowLayoutColumnInfo.WeightY = 1.0f;

			// Set the default row height to 200 and turn on the auto-fit 
			// columns to demonstrate the effect that WeightX and WeightY
			// properties have.
			this.ultraGrid1.DisplayLayout.Override.DefaultRowHeight = 100;
			this.ultraGrid1.DisplayLayout.AutoFitColumns = true;

			band.Override.RowSpacingAfter = 5;
		}
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