Version

PerformAutoResize() 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() 
public void PerformAutoResize()
Remarks

The parameterless overload of the PerformAutoResize method uses an effective ColumnAutoSizeMode value of 'VisibleNodes'. Use the more complex overload to auto-size columns differently.

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