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
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.
i tried to set the chaptered columns to invisible, but it does not work. All following sub nodes are invisible, too. If these empty nodes are band nodes, there should be the name of the band, or not? Then, if I am clicking onto such an empty node, I got an error which I cannot catch in an exception handler. Please see the screenshot of the error:
Please let me show you my data set and the relations between the tables. Maybe you can find the error: Would be great! :)
Thanks a lot for your help!