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
170
UltraWinGrid, tree expansion and grouping columns
posted

Hi,

I have followed the example KB02000 on a self-referencing table to produce a tree-like grid. Additionally my users would like me to logically group certain columns together by using a column header with two levels. Since all by data bands have the same columns I still want to keep the columns aligned across all the bands, so that resizing a column on one databand should resize the column on all data bands. It seems though when I add some column groupings to one or more data bands the columns become misaligned. They become visually like 'independent tables', if you can see what I mean, which is what I am trying to avoid.

What I really need is a grid that functions exactly like a single data band but that has the ability to expand and collapse groups of rows.

Is there a better approach than using data bands. I was considering just putting all the data into the grid in correct hierarchical display order and then implementing my own expand/collapse functions but not sure how best to do this? Do you have any better ideas?

 

Parents
No Data
Reply
  • 69832
    Offline posted

    the4thamigo_uk said:
    What I really need is a grid that functions exactly like a single data band but that has the ability to expand and collapse groups of rows.

    If I understood this correctly, you want something like what Outlook Express does, which is supported by UltraTree via the 'OutlookExpress' ViewStyle. There is a sample that is included with the SDK, 'UltraTree NewsgroupReader', which demonstrates this style; if you have access to that sample you can run it to see if that is what you are shooting for. If so, you really just have to set the control's ViewStyle and assign the data source; assuming the data source is recursive in nature, the control will show what looks like a single-band grid, with an expansion indicator in the first column of type string (you can change this if desired). When the user expands rows (nodes), the child rows appear, bvut they appear as if in the same band as the parent.

Children