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
479
UltraTree Merge cells
posted

Hi,

Is it possible to merge cells from the same ColumnSet in the ultratree Outlook Express view style?

E.g.:

Root node       Col1    Col2    Col3
  Node 1        25      25      0
  Node 2        25      12.5    12.5
  Node 3        <No input values found>

In the example Node 3 has 1 large cell instead of 3.

Thanks in advance!

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    In theory, you might be able to achieve something like this using an unbound column and a CreationFilter. I say "in theory" because I have not tried this in the tree, but I have done it in the WinGrid and they both use a GridBagLayout to position the cells. 

    The idea is... in a GridBagLayout, it's possible for two objects to occupy the same space in the layout. The designer won't allow this, but you could set it up that way in code.

    So what you do is add an unbound column to the ColumnSet and set up the column's NodeLayoutInfo so that the unbound column spans across the entire node. So in the example you have here, assuming each column has a SpanX of 1 and that the RootNode Column has an OriginX of 0, then unbound column's settings would be:

    OriginX = 0

    SpanX = 4

    So the unbound column occupies the same same in the layout that the 4 other columns combined occupy.

    Then, for each node, you either have to hide the unbound column or hide the other 4 columns so that only one or the other shows up in each node. In the WinGrid, this can be done using the hidden property on the cell. The tree doesn't have a Hidden property on the cell, so you would have to hide the UIElements using a CreationFilter, instead.

Children