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
195
Multiple databinds to a tree
posted
This post correlates to another posting:

http://forums.infragistics.com/forums/p/3849/19716.aspx

I have a tree that has a few unbound nodes as follows:

root (created manually)
|------------CategoryA (created manually)
|------------CategoryB (created manually)
|------------CategoryC (created manually)

I am trying to databind a bindinglist to Categories A, B and C.

My code looks like:

UltraTreeNode rootNode = new UltraTreeNode("root");
rootNode.Text = "root";
rootNode.LeftImages.Add(Properties.Resources. root);
myTree.Nodes.Add(rootNode);

UltraTreeNode CategoryA = new UltraTreeNode("CategoryA");
CategoryA.Text = "CategoryA";
CategoryA.LeftImages.Add(Properties.Resources. CategoryA);
rootNode.Nodes.Add(CategoryA);
CategoryA.Nodes.SetDataBinding(CategoryAList, "Name");

UltraTreeNode CategoryB = new UltraTreeNode("CategoryB");
CategoryB.Text = "CategoryB";
CategoryB.LeftImages.Add(Properties.Resources. CategoryB);
rootNode.Nodes.Add(CategoryB);
CategoryB.Nodes.SetDataBinding(CategoryBList, "Name");

UltraTreeNode CategoryC = new UltraTreeNode("CategoryC");
CategoryC.Text = "CategoryC";
CategoryC.LeftImages.Add(Properties.Resources. CategoryC);
rootNode.Nodes.Add(CategoryC);
CategoryC.Nodes.SetDataBinding(CategoryCList, "Name");

Now I do have items in all those lists, but for some reason its not reflecting in the tree. Is there some kind of setting I'm missing?

Jeremy
  • 195
    posted
    I have solved this. I just set the datamember to null instead and viola!