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
140
Multi-column Tree View - use a hack or wait for a proper implementation (when:) ?
posted

I have been playing around with trying to make XamDataGrid behave like DevExpress's XtraTreeList (WinForm implementation), i.e. need to have a tree view with multiple columns: the first column is like a tree, all the rest like a grid.  A tree view can be considered a nested hierarchy or a self-referencing hierarchy. All columns must be aligned for any number of the hierarchy levels (i.e. column gridlines should go straight though all the nodes/levels).

There is no Infragistics control of this type so I wanted to 'hack' XamDataGrid with a hierarchical data source to achieve a similar functionality (and getting close, not exactly, but close to a multi-column tree view). Using a post from this forum I was able to do this for a 2 level hierarchy (the idea is to bind the field label width of the child row to the corresponding parent's value), so to have all the grid columns aligned. But as soon as I went to more levels then the specified fields layout would not be used and the looks get messed up.  In a multi-column tree all levels use the same set of fields so the same fieldlayout should work for all rows at all different levels. But in my case only one level would use it and the others would not recognize it and would auto-generate all fields/columns. It looks like that each hierarchy level produces a unique relationship field that for some reason prevents the grid from using the fieldlayout  I specified. Or  I have missed something and then it's entirely my fault.

Because the control has a grid-type look I would want to have sorting and filtering. Ideally, I also want this control to allow custom aggregation of child values, so top levels would be hooked up to an aggregation function ('sum', 'average', or  take your delegate).

Does anybody have any experience with such a scenario? Any insights would be greatly  appreciated.

To Infragistics team: I have already requested this feature through the web site.

Regards,

g8r