Examples for a hierarchical grid show two or more DataTables bound with a relationship.
I have business objects in a list, where a specific property of each object is itself a list of complex objects. Example:
Customers[0].Notes[1].Date
Customers[4].Notes[2].By
Classes there include a Customers collection, a Customer, a Notes collection, and a Note.
In this example, there is no foreign key or other property to establish a relationship between Notes and Customers, (no Note.CustomerID) because any given note can only be related to it's parent Customer.
So how would I create a hierarchical grid where each row is a Customer, opening to a secondary GridViewTemplate which shows desired Notes data?
Since I have source for all business classes and the classes from which they derive, I can convert the collections to anything including BindingList and DataTable. I'd like to avoid creating a proxy DataTable that has all Notes with a new custom property to relate back to their Customer. That seems to be a lot of code for a simple purpose.
Do all desired Notes fields need to be specified in code-behind, building each column of a GridViewTemplate, or is there a way to do this visually?
Thanks!