Version

PerformAutoResize(ColumnAutoSizeMode) Method

Resizes this UltraTreeNodeColumn based on the contents of its cells and/or labels, depending on the resolved value of the LabelPosition property.
Syntax
'Declaration
 
Public Overloads Sub PerformAutoResize( _
   ByVal autoSizeMode As ColumnAutoSizeMode _
) 
public void PerformAutoResize( 
   ColumnAutoSizeMode autoSizeMode
)

Parameters

autoSizeMode
Determines whether all nodes associated with this UltraTreeNodeColumn are autosized, whether descendants of collapsed nodes are included, or only nodes that are currently visible are included.
Example
The following code sample demonstrates how the UltraTreeNodeColumn's PerformAutoResize method can be used to automatically size all cells in a column, without regard to which cells are in view.

Imports Infragistics.Win
Imports Infragistics.Win.Layout
Imports Infragistics.Win.UltraWinTree

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim rootColumnSet As UltraTreeColumnSet = Me.ultraTree1.ColumnSettings.RootColumnSet
        rootColumnSet.Columns("CompanyName").PerformAutoResize(ColumnAutoSizeMode.AllNodes)
    End Sub
using Infragistics.Win;
using Infragistics.Win.Layout;
using Infragistics.Win.UltraWinTree;
using System.Diagnostics;

		private void button1_Click(object sender, System.EventArgs e)
		{
			UltraTreeColumnSet rootColumnSet = this.ultraTree1.ColumnSettings.RootColumnSet;
			rootColumnSet.Columns["CompanyName"].PerformAutoResize( ColumnAutoSizeMode.AllNodes );
		}
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