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
850
Setting column set in NodeLevelOverrides prevents node tree creation?
posted

I'm binding an UltraTree to a structure like this:

   list
      list
         object
         object
         ...

This works fine. I then rebind the tree to a structure with one less level:

   list
      object
      object
      ...

This also works fine. However, if I try binding to the original, three-level structure again, I get a tree containing only a single node (for the second-level list, since the first-level list becomes the implicit tree root).

This seems to be related to some games I'm playing in AfterDataNodesCollectionPopulated. In that event, I'm setting NodeLevelOverrides to use a particular column set for each tree level other than the last one, and I'm setting the last level to use a different column set. If I disable this code, the problem does not occur.

It seems to me as if maybe the tree node creation is not working because the second-level list doesn't have all the properties my column set is looking for, or something like that. Any ideas?

Thanks,
   Aaron

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Aaron,

    My guess is that this is caused by the automatic generation of ColumnSets in the tree. By default, the tree automatically builds the ColumnSets based on the data structure and it links up the ColumnSet to each band via the band's Key.

    Assuming that you are allowing the tree to auto-generate the ColumnSets and are not creating them yourself, you can probably fix the issue very easily by setting the tree's DataSource to null and clearing the tree.ColumnSettings.ColumnSets collection right before you change the tree's DataSource.

Children