Version

ExpansionIndicatorColumn Property

Returns the UltraTreeNodeColumn that defines which UltraTreeNodeCell displays the expansion indicator for the corresponding UltraTreeNode. Applicable only when the associated UltraTree control's ViewStyle property resolves to ViewStyle.OutlookExpress.
Syntax
'Declaration
 
Public ReadOnly Property ExpansionIndicatorColumn As UltraTreeNodeColumn
public UltraTreeNodeColumn ExpansionIndicatorColumn {get;}
Remarks

The CanShowExpansionIndicator property dictates whether cells in a particular column can display an expansion indicator. The cell that actually displays it is the first one in the visible order whose CanShowExpansionIndicator property resolves to true.

Note: The CanShowExpansionIndicator property, when not set to a specific value, resolves to true for columns whose DataType property is set to the type System.String.

Also note that the ExpansionIndicatorColumn property can return a null value (Nothing in VB); for example, if this UltraTreeColumnSet's Columns collection is empty, or the CanShowExpansionIndicator property is specifically set to false for all of its members, no column is defined as the ExpansionIndicatorColumn and as such the property returns false. For this reason, it is important to check the return value from this property before accessing any of its members to ensure that it does not contain a null reference.

Also note that if the Override.ShowExpansionIndicator property for an UltraTreeNode's effective Override is specifically set to false, the expansion indicator is not displayed for a cell within that node, regardless of the value of the CanShowExpansionIndicator property.

Example
The following code sample demonstrates how to use the properties of the UltraTreeColumnSet object to control the behavior of all columns in a particular UltraTreeColumnSet's Columns collection.

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

        '	Disallow cell sizing for all columns in the Columns collection
        rootColumnSet.AllowCellSizing = LayoutSizing.None

        '	Disallow cell span sizing for all columns in the Columns collection
        rootColumnSet.AllowCellSpanSizing = GridBagLayoutAllowSpanSizing.None

        '	Disallow moving for all columns in the Columns collection
        rootColumnSet.AllowColMoving = GridBagLayoutAllowMoving.None

        '	Disallow header sizing for all columns in the Columns collection
        rootColumnSet.AllowLabelSizing = LayoutSizing.None

        '	Disallow header span sizing for all columns in the Columns collection
        rootColumnSet.AllowLabelSpanSizing = GridBagLayoutAllowSpanSizing.None

        '	Disallow sorting for all columns in the Columns collection
        rootColumnSet.AllowSorting = DefaultableBoolean.False

        '	Don't display cell borders for any columns in the Columns collection
        rootColumnSet.BorderStyleCell = UIElementBorderStyle.None

        '	Don't display header borders for any columns in the Columns collection
        rootColumnSet.BorderStyleColumnHeader = UIElementBorderStyle.None

        '	Set the BackColor for all cells in all columns to 'Control'
        rootColumnSet.CellAppearance.BackColor = SystemColors.Control

        '	Set CellWrapText to False to prevent text from
        '	wrapping to additional lines in all columns
        rootColumnSet.CellWrapText = DefaultableBoolean.False

        '	Set ColumnAutoSizeMode to 'VisibleNodes' so that when the end
        '	user auto-sizes a column, only currently visible cells are considered
        rootColumnSet.ColumnAutoSizeMode = ColumnAutoSizeMode.VisibleNodes

        '	Set the HeaderStyle property to 'Standard', so that column headers
        '	are not themed, and set the BackColor of the ColumnHeaderAppearance
        '	to 'ControlDark'.
        rootColumnSet.HeaderStyle = HeaderStyle.Standard
        rootColumnSet.ColumnHeaderAppearance.BackColor = SystemColors.ControlDark

        '	Change the size of images displayed in the headers to 20w X 20h
        rootColumnSet.ColumnHeaderImageSize = New Size(20, 20)

        '	If there is currently no ExpansionIndicatorColumn, set the
        '	CanShowExpansionIndicator property to true for the
        '	'CompanyName' column
        If rootColumnSet.ExpansionIndicatorColumn Is Nothing Then
            rootColumnSet.Columns("CompanyName").CanShowExpansionIndicator = DefaultableBoolean.True
        End If

        '	Set the LabelPosition property ot display headers on top of cells,
        '	and set the LabelStyle property to display headers and cells
        '	separately.
        rootColumnSet.LabelPosition = NodeLayoutLabelPosition.Top
        rootColumnSet.LabelStyle = NodeLayoutLabelStyle.Separate

        '	Assign the 'CompanyName' column to the NodeTextColumn property,
        '	so that the value of the Text property is obtained from the cell
        '	in the 'CompanyName' column.
        rootColumnSet.NodeTextColumn = rootColumnSet.Columns("CompanyName")

        '	Set the NullText property to "[NULL]" so that null values in any
        '	cell for all columns is displayed the same way.
        rootColumnSet.NullText = "[NULL]"

        '	Show sort indicators for all columns
        rootColumnSet.ShowSortIndicators = DefaultableBoolean.True
    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;
			
			//	Disallow cell sizing for all columns in the Columns collection
			rootColumnSet.AllowCellSizing = LayoutSizing.None;

			//	Disallow cell span sizing for all columns in the Columns collection
			rootColumnSet.AllowCellSpanSizing = GridBagLayoutAllowSpanSizing.None;

			//	Disallow moving for all columns in the Columns collection
			rootColumnSet.AllowColMoving = GridBagLayoutAllowMoving.None;

			//	Disallow header sizing for all columns in the Columns collection
			rootColumnSet.AllowLabelSizing = LayoutSizing.None;

			//	Disallow header span sizing for all columns in the Columns collection
			rootColumnSet.AllowLabelSpanSizing = GridBagLayoutAllowSpanSizing.None;

			//	Disallow sorting for all columns in the Columns collection
			rootColumnSet.AllowSorting = DefaultableBoolean.False;

			//	Don't display cell borders for any columns in the Columns collection
			rootColumnSet.BorderStyleCell = UIElementBorderStyle.None;

			//	Don't display header borders for any columns in the Columns collection
			rootColumnSet.BorderStyleColumnHeader = UIElementBorderStyle.None;

			//	Set the BackColor for all cells in all columns to 'Control'
			rootColumnSet.CellAppearance.BackColor = SystemColors.Control;

			//	Set CellWrapText to False to prevent text from
			//	wrapping to additional lines in all columns
			rootColumnSet.CellWrapText = DefaultableBoolean.False;

			//	Set ColumnAutoSizeMode to 'VisibleNodes' so that when the end
			//	user auto-sizes a column, only currently visible cells are considered
			rootColumnSet.ColumnAutoSizeMode = ColumnAutoSizeMode.VisibleNodes;

			//	Set the HeaderStyle property to 'Standard', so that column headers
			//	are not themed, and set the BackColor of the ColumnHeaderAppearance
			//	to 'ControlDark'.
			rootColumnSet.HeaderStyle = HeaderStyle.Standard;
			rootColumnSet.ColumnHeaderAppearance.BackColor = SystemColors.ControlDark;

			//	Change the size of images displayed in the headers to 20w X 20h
			rootColumnSet.ColumnHeaderImageSize = new Size( 20, 20 );

			//	If there is currently no ExpansionIndicatorColumn, set the
			//	CanShowExpansionIndicator property to true for the
			//	'CompanyName' column
			if ( rootColumnSet.ExpansionIndicatorColumn == null )
				rootColumnSet.Columns["CompanyName"].CanShowExpansionIndicator = DefaultableBoolean.True;

			//	Set the LabelPosition property ot display headers on top of cells,
			//	and set the LabelStyle property to display headers and cells
			//	separately.
			rootColumnSet.LabelPosition = NodeLayoutLabelPosition.Top;
			rootColumnSet.LabelStyle = NodeLayoutLabelStyle.Separate;

			//	Assign the 'CompanyName' column to the NodeTextColumn property,
			//	so that the value of the Text property is obtained from the cell
			//	in the 'CompanyName' column.
			rootColumnSet.NodeTextColumn = rootColumnSet.Columns["CompanyName"];

			//	Set the NullText property to "[NULL]" so that null values in any
			//	cell for all columns is displayed the same way.
			rootColumnSet.NullText = "[NULL]";

			//	Show sort indicators for all columns
			rootColumnSet.ShowSortIndicators = DefaultableBoolean.True;			
		}
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