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
750
WinTree: Empty nodes when binding to data set
posted

Hi!

I have the following problem: I want to bind my UltraTree to a dataset. Within this dataset, there are some tables: departments, positions, employees etc. Each table is connected to an other one with relations set in the data set. For example, the department table has an id column. The positions table has a departmentId column, so that I can connect these tables over these ids.

That works fine for near all relations in the dataset. But as you can see in the screenshot below, I have some empty nodes. For example under the node "Back of House", all positions should appear. But there is an empty node, which contains the positions. I do not want these empty nodes.

It works fine for the employees (e.g. "S., Kai") and the connected salary components. I do the same for all tables in the dataset (connect the tables with relations between the tables using id columns).

Please, can you tell me, whats going wrong?

Thanks a lot for your help! I need it very fast! :)

Best regards!

Robin

Parents
  • 469350
    Offline posted

    Hi,

    My guess is that these empty nodes are probably band nodes. If your root band here has multiple child bands, then the tree has to separate them using band nodes so that the same nodes collection doesn't contain data from two different tables in your data set.

    If your root band has two child bands, and you only want to display one of them, then you can handle this very easily by hiding or removing the other child band from the tree. The way it works is that a child band is a special type of column in the ColumnSet. So assuming you are allowing the tree to AutoGenerate the ColumnSets, what you would do is handle the ColumnSetGenerated event of the tree and watch for the creation of the ColumnSet for the root band. Then look at the columns in that ColumnSet. There will be two columns which have the IsChaptered property set to true. These represent the child bands and you can hide or remove one of them.

Reply Children