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
20
UltraTree DOES NOT show new node on an extra level
posted

Hi,

 

I was building an UltraWinTree and bind it to objects.

 

My original dataset in database for Test1 has 3 levels, after I insert a new record of Test1 on any of the existing level, it’s shown correctly, but if I insert a new record of Test1 into the database on a new level, i.e. adding a child to a level3 Test1 node, when I rebuild the tree, it doesn’t show this new node on the new level (level4).

 

My original Test2 dataset in database has 4 levels. The tree does show all nodes on all the levels properly. Again, when I tried to insert a record of Test2 into the database on level5, it’s not shown either.

 

It looks like the tree is not shown correctly when I want to add a node on a new level. I attached some code that I used to build the tree. Hope it will help explain my issue.

 

Thanks. 

 

 

 

       public void BuildTree(string root, UltraTree treeView)

 

         {

             if (root == "TestRoot1")

             {

                 List<Test1> rootList = new List<Test1>();

                 foreach (Test1 r in LoadData_Test1())

                 {

                     if (r.Name == root)

                     {

                         rootList.Add(r);

                     }

                 }

                 treeView.SetDataBinding(rootList, null);

             }

 

             else if (root == "TestRoot2")

             {

                 List<Test2> rootList = new List<Test2>();

                 foreach (Test2 r in LoadData_Test2())

                 {

                     if (r.Name == root)

                     {

                         rootList.Add(r);

                     }

                 }

                 treeView.SetDataBinding(rootList, null);

             }

            

         }

  • 469350
    Suggested Answer
    Offline posted

    Hi Michelle,

    It's hard to tell just from a code snippet. But my guess is that the tree's ColmunSets don't have any information for level 4, since this band did not exist when the application started. A child band is actually just a special type of column. So if you add a band to your data source, the ColmunSet of the parent band needs to contain a column that represents that band and has it's IsChaptered property set to true.