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
135
Hierarchical grid (OutlookGroupBy), one self-referencing table
posted

Hello,

My situation is described in the subject. I have an UltraWebGrid (2008.3, CLR 3.5) and a typed dataset with one self-referencing table. The columns and bands get auto-generated, I set the table as the datasource and bind the grid.

The grid does indeed display the data hierarchically, but it also includes all "child" rows on the first level (Band 0). Is there any way other than manually removing the "child" rows from the first band in the InitializeLayout event? This is what I do at the moment to remove them from appearing as parents, but I'm wondering if there isn't some hidden property that makes the grid figure this out on its own.

BTW, the grid is read-only, so I'm not worried about any editing consequences.

Regards,
    Gorazd

Parents
  • 45049
    Verified Answer
    posted

    There is no "hidden property" that will remove these rows for you.  You'd see a similar result for any other hierarchical, databound ASP.NET controls (or Windows Forms controls, for that matter) bound to the same kind of self-refrerencing data source.

    One option I've seen used is to have a single table that represents the "root" data, which contains only those entries that have no other parents, and a second table tthat contains the rest of the data.  The "parent" table is related to the child table, and the "child" table is related to itself.

Reply Children