I want to dynamically create and display a ColumnSet with multiple cells under each column, but with a header only on the top cell. When I add an UltraTreeNode and set its Override.ColumnSet to my columnSet, it gets a set of headers along with the set of cells. How can I display a single set of headers above the first node and not the subsequent nodes? This code is adding nodes on the fly, not using databinding.
The tree uses a GridBagLayout for the layout of each node. What you would have to do is hide the readl column header for each of the column, then add in some dummy columns that only have a header. You do this using the LabelPosition property of the column. You can set it to None to hide a column and set it to LabelOnly to have a header with no column. Then you would adjust the SpanX, SpanY, OriginX, and OriginY to position the headers and columns so they span.
Hi Mike,
When you say add dummy columns, do you mean:
A. add a dummy node on top of other nodes. set the columnset of that node to the same columnset as the other nodes, set the LabelPosition of the dummy node to LabelOnly and set the LabelPosition of the other nodes to None?
OR
B. create a separate dummy columnset with the same columns as the previous columnset, set the columnset of the dummy node to the dummy columnset, set the LabelPosition of the dummy node to LabelOnly and set the LabelPosition of the other nodes to None?
I tried both options. With option A, the dummy node displays empty cells with no column headers and no column headers are displayed on any nodes. With option B, the dummy node displays the column headers and the other nodes display only the cells (which is want I was looking for). However the column headers forms its own independant grid and is independant to the other nodes. :S
Any ideas? How do adjust the SpanX, SpanY, OriginX, and OriginY?
Also, is it possible to freeze the headers when you scroll down the tree?
Thanks in advance!
Niz
I want to achieve something similar: I have an UltraTree with ViewStyle.FreeForm. On top of the sub-elements column headers, I want to put a general title header - what is the type of the sub-elements grid.
How can I do that ?
10x,
Yoni