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
725
Hierarchical Data Source - not seeing all child nodes
posted

O.k. - need a little help here - I'm a WinForms Developer trying to help out our Web Developer.

We have built a hierarchical data source. The best I can represent it is as follows (dt = data table)

- Parent (Location or Site)  dt1 data

- - Child 1 (Local Device Master) dt2 data

- - Child 1 (Local Device Master)

- - - Child 2A (Remote Device Master) dt3 data

- - - - Child 3 (Remote Item - on remote master) dt5 data

- - - - Child 3 (Remote Item - on remote master)

- - - - Child 3 (Remote Item - on remote master)

- - - Child 2B (Item on Local Device Master) dt4 data

- - - Child 2B (Item on Local Device Master)

- - - Child 2B (Item on Local Device Master)

- Parent (Location or Site)

- - Child 1 (Local Device Master)

- - Child 1 (Local Device Master)

 

Data Set Relations (Parent <- Child):

dt1 <- dt2

dt2 <- dt3

dt2 <- dt4

dt3 <- dt5

Now - on to the problem. We are using the EXACT same code to build the data set & apply the data relations.

When I bind a Windows Forms Grid to the Datasource - it displays exactly as expected and shown above.

When he binds it to a WebGrid - we are not seeing any of the "Child 2B Data" for the Child 1 nodes.

And that's about as much as I am smart enough to relate so please feel free to ask questions for further explanation.

And thanks in advance for the help.

Parents
No Data
Reply
  • 45049
    Verified Answer
    posted

    The issue here is that you have a multiple inheritane situation.  WebGrid cannot display multiple child tables for a single parent table.

    n2dfire said:
    Data Set Relations (Parent <- Child):

    dt1 <- dt2

    dt2 <- dt3

    dt2 <- dt4

    dt3 <- dt5

    According to this, both "dt3" and "dt4" are children of "dt2."  WebGrid can display one relation or the other, not both, which is basically the result you've described.

    WinGrid, as you've found, has the ability to show multiple relations.

Children