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.
Thanks Brian! That worked! :)
Hi Niz,
niz358 said: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?
No, I said add columns, not nodes.
niz358 said: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?
No, I didn't mention adding a ColumnSet.
What I suggested is that you add Columns to the ColumnSet and set the LabelPosition to LabelOnly. This gives you a column header with no cells.
FredSaw said: 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
When an UltraTreeColumnSet is assigned to the Override for an individual node, headers are displayed based on the assumption that the data for that node could be different than that of its siblings. To avoid headers appearing for each node, assign the UltraTreeColumnSet to the Override exposed by the Nodes collection, not the one exposed by the node.
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
Oh, sorry. The LabelPosition, like all other node layout info, is on the LayoutInfo object.
So it's column.LayoutInfo.LabelPosiiton.