Version

Enabled Property (UltraTreeNode)

Gets/sets a value indicating whether the tree node responds to activation, selection, etc.
Syntax
'Declaration
 
Public Overridable Property Enabled As Boolean
public virtual bool Enabled {get; set;}
Remarks

A disabled node can never be Selected or Activated

A disabled node cannot be Expanded or collapsed by the user, but the Expanded property can still be set programmatically.

Note: To disable cells without disabling the node itself, set the AllowCellEdit property to 'Disabled'.



Also note that if any ancestor node of this UltraTreeNode is disabled, this node is effectively disabled as well; whether this is the case can be determined by the EnabledResolved property. The EnabledResolved property returns false for all nodes when the control is disabled.

Example
The following sample code sets various properties on an UltraWinListbar.

Private Sub InitializeListbar()
		
    With Me.ultraListBar1
        ' Set the border style of the control
        .BorderStyle = Infragistics.Win.UIElementBorderStyle.InsetSoft

        ' Set the icon that will be used for items
        ' that don't specify their own
        .DefaultIcon = New Icon(Me.GetType(), "MyDefault.ico")

        ' Set the default style to be used for
        ' new groups when they are added
        .DefaultStyle = Infragistics.Win.UltraWinListBar.Style.SmallIcons

        ' Specify whether group headers are visible (the default
        ' setting is true).
        ' Note: If this is set to 'false' then only the currently 
        ' selected group's items are visible. In that case 
        ' there would be no UI exposed by the listbar control 
        ' for selecting another group. 
        ' However, the listbar's 'SelectedGroup' property can
        ' be used to select another group in code. 
        .GroupHeadersVisible = True

        ' Specify whether the listbar has a vertical
        ' or horizontal orientation
        .Orientation = Infragistics.Win.UltraWinListBar.Orientation.Vertical

        ' Have the control put up the default context menus.
        ' Note: if the control's 'ContextMenu' is set then
        ' this property setting is ignored.
        .ShowContextMenus = True

        Dim group As Infragistics.Win.UltraWinListBar.Group
        Dim item As Infragistics.Win.UltraWinListBar.Item

        ' First clear the groups collection since there is 
        ' one group added by default
        .Groups.Clear()

        ' Add a group 
        group = .Groups.Add("G1", "Group header 1")

        ' Set its style property if you don't want to use
        ' the default style set above
        group.Style = Infragistics.Win.UltraWinListBar.Style.LargeIcons

        ' select this group
        group.Selected = True

        ' add items to the group and specify both the large and 
        ' small image indexes for each. 

        ' Note: If the index isn't specified of the corresponding
        ' Large/SmallImageList is null or doesn't have an image
        ' at that index then the DefaultIcon that was specified
        ' above will be used for that item.
        item = group.Items.Add("I1", "Item 1 caption")
        item.SmallImageIndex = 0
        item.LargeImageIndex = 0

        item = group.Items.Add("I2", "Item 2 caption")
        item.SmallImageIndex = 1
        item.LargeImageIndex = 1

        ' Continue to add other groups and their items
        group = Me.ultraListBar1.Groups.Add("G2", "Group header 2")

        item = group.Items.Add("I1", "Group 2 - Item 1")
        item.SmallImageIndex = 0
        item.LargeImageIndex = 0
    End With

End Sub
private void InitializeListbar()
{

	// Set the border style of the control
	this.ultraListBar1.BorderStyle = Infragistics.Win.UIElementBorderStyle.InsetSoft;

	// Set the icon that will be used for items
	// that don't specify their own
	this.ultraListBar1.DefaultIcon = new Icon( this.GetType(), "MyDefault.ico" );

	// Set the default style to be used for
	// new groups when they are added
	this.ultraListBar1.DefaultStyle = Infragistics.Win.UltraWinListBar.Style.SmallIcons;
	
	// Specify whether group headers are visible (the default
	// setting is true).
	// Note: If this is set to 'false' then only the currently 
	// selected group's items are visible. In that case 
	// there would be no UI exposed by the listbar control 
	// for selecting another group. 
	// However, the listbar's 'SelectedGroup' property can
	// be used to select another group in code. 
	this.ultraListBar1.GroupHeadersVisible = true;

	// Specify whether the listbar has a vertical
	// or horizontal orientation
	this.ultraListBar1.Orientation = Infragistics.Win.UltraWinListBar.Orientation.Vertical;

      // Have the control put up the default context menus.
      // Note: if the control's 'ContextMenu' is set then
      // this property setting is ignored.
	this.ultraListBar1.ShowContextMenus = true;

	Infragistics.Win.UltraWinListBar.Group group; 
	Infragistics.Win.UltraWinListBar.Item item; 

	// First clear the groups collection since there is 
	// one group added by default
	this.ultraListBar1.Groups.Clear();

	// Add a group 
	group = this.ultraListBar1.Groups.Add("G1", "Group header 1" );

	// Set its style property if you don't want to use
	// the default style set above
	group.Style = Infragistics.Win.UltraWinListBar.Style.LargeIcons;

	// select this group
	group.Selected = true;

	// add items to the group and specify both the large and 
	// small image indexes for each. 

	// Note: If the index isn't specified of the corresponding
	// Large/SmallImageList is null or doesn't have an image
	// at that index then the DefaultIcon that was specified
	// above will be used for that item.
	item = group.Items.Add("I1", "Item 1 caption" );
	item.SmallImageIndex = 0;
	item.LargeImageIndex = 0;
	
	item = group.Items.Add("I2", "Item 2 caption" );
	item.SmallImageIndex = 1;
	item.LargeImageIndex = 1;

	// Continue to add other groups and their items
	group = this.ultraListBar1.Groups.Add("G2", "Group header 2" );

	item = group.Items.Add("I1", "Group 2 - Item 1" );
	item.SmallImageIndex = 0;
	item.LargeImageIndex = 0;

}
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