Infragistics2.Win.UltraWinTree.v8.1
AfterDataNodesCollectionPopulated Event
See Also  Example
Infragistics.Win.UltraWinTree Namespace > UltraTree Class : AfterDataNodesCollectionPopulated Event

Occurs after a TreeNodesCollection object is populated with bound data.

Syntax

Visual Basic (Declaration) 
Public Event AfterDataNodesCollectionPopulated() As AfterDataNodesCollectionPopulatedEventHandler
C# 
public event AfterDataNodesCollectionPopulatedEventHandler AfterDataNodesCollectionPopulated()

Example

Visual BasicCopy Code
Imports Infragistics.Win.UltraWinTree

    Private Sub ultraTree1_AfterDataNodesCollectionPopulated(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinTree.AfterDataNodesCollectionPopulatedEventArgs) Handles ultraTree1.AfterDataNodesCollectionPopulated
        ' This event fires after the tree has populated a Nodes collection
        ' with data from the data source.
        ' Since the nodes collection has been populated with nodes at this point,
        ' This is an excellent place to autosize the columns based on their
        ' contents.
        Dim column As UltraTreeNodeColumn
        For Each column In e.Nodes.ColumnSetResolved.Columns
            column.PerformAutoResize(ColumnAutoSizeMode.AllNodesWithDescendants)
        Next
    End Sub
C#Copy Code
using Infragistics.Win.UltraWinTree;

private void ultraTree1_AfterDataNodesCollectionPopulated(object sender, Infragistics.Win.UltraWinTree.AfterDataNodesCollectionPopulatedEventArgs e)
       {
           
// This event fires after the tree has populated a Nodes collection
           
// with data from the data source.
           
// Since the nodes collection has been populated with nodes at this point,
           
// this is an excellent place to autosize the columns based on their
           
// contents.
           
foreach (UltraTreeNodeColumn column in e.Nodes.ColumnSetResolved.Columns)
               column.PerformAutoResize(ColumnAutoSizeMode.AllNodesWithDescendants);
       }

See Also