We are using data binding in our application, and are having trouble
finding out how to bind a hierarchy of lists of business objects.

What we have is this hierarchy:

List<Orders>
|
(Order)
|- List<Groups>
|
(Group)
|- List<Members>

We want to create a form where each of these lists is displayed in a
grid, and data is updated depending on what the user selects. The grids
cannot be nested. Can this be done?

Re: Data binding a hierarchy of lists of business objects by Havard

Havard
Fri Jan 19 05:28:10 CST 2007


Havard Stranden wrote:
> We are using data binding in our application, and are having trouble
> finding out how to bind a hierarchy of lists of business objects.
>
> What we have is this hierarchy:
>
> List<Orders>
> |
> (Order)
> |- List<Groups>
> |
> (Group)
> |- List<Members>
>
> We want to create a form where each of these lists is displayed in a
> grid, and data is updated depending on what the user selects. The grids
> cannot be nested. Can this be done?

We found the solution: Use the master/detail pattern with nested
BindingSources for the grid hierarchy, and everything works. :)