Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1210
Documentation and Guides, Need help
posted
Hi, I'm wondering if you guys have any guides available on the internet.I'm a new user with Infragistics, my department is examining Infragistics after some time working with Devexpress.I find your controls quite satisfying but it seems to take a lot of time to understand how to work with them since there is missing documentation or tutorials.For example, I’m trying to work with the UltraWinTree, besides “playing” with it (which I find not intuitive) - I can't think of anything else that could clarify the use of this control.Can you help with this? Maybe guides/tutorials/documentation...Regarding the UltraWinTree, can you help with first steps? How do I create let’s say a BASIC tree, a one that is not binded to any database...

And if I want to bind a one to a data base, it seem to build the structure without my interference, how can I control it?

Parents
No Data
Reply
  • 69832
    Offline posted

    Here is a simple example of how to populate the control with 3 levels of nodes: 

    //  Use the NodeLevelOverrides collection to assign images based on the level
    //  at which the node resides...level zero represents the root Nodes collection,
    //  and each subsequent level reflects how "deep" into the hierarchy the node is.
    this.ultraTree1.NodeLevelOverrides[0].NodeAppearance.Image = rootNodeImage;
    this.ultraTree1.NodeLevelOverrides[1].NodeAppearance.Image = childNodeImage;
    this.ultraTree1.NodeLevelOverrides[2].NodeAppearance.Image = grandChildNodeImage;

    //  Switch off painting temporarily while the tree is populated
    this.ultraTree1.BeginUpdate();

    for ( int i = 0; i < 10; i ++ )
    {
        //  Create a node and add it to the control's Nodes collection
        UltraTreeNode rootNode = new UltraTreeNode( null, string.Format("Node {0}", i) );
        this.ultraTree1.Nodes.Add( rootNode );

        for ( int j = 0; j < 10; j ++ )
        {
            //  Add a node to the root node's Nodes collection
            UltraTreeNode childNode = rootNode.Nodes.Add( null, string.Format("Node {0}.{1}", i, j) );

            for ( int k = 0; k < 10; k ++ )
            {
                //  Add a node to the child node's Nodes collection
                UltraTreeNode grandChildNode = childNode.Nodes.Add( null, string.Format("Node {0}.{1}.{2}", i, j, k) );
            }
        }
    }

    //  Resume painting
    this.ultraTree1.EndUpdate();

     Regarding controlling the structure of a data bound tree: This can be accomplished using the  ColumnSetGenerated event, and the properties of the UltraTreeColumnSet and UltraTreeNodeColumn classes. An example of how to use these classes is available in the 'UltraTree DataBinding' sample that ships with the product.

Children
No Data