This is a migrated thread and some comments may be shown as answers.

Hierarchical views of business objects

3 Answers 99 Views
GridView
This is a migrated thread and some comments may be shown as answers.
TonyG
Top achievements
Rank 1
TonyG asked on 21 May 2010, 10:43 PM

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!

3 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 27 May 2010, 02:55 PM
Hello TonyG,

In the current edition of RadGridView the proxy object must be provided to support your scenario. The proxy may be implemented as IBindingList or DataTable.

Currently, we are working on the support of this functionality and we are extending the hierarchy modes for different business needs. The vNEXT edition of control will support self-reference, object relational hierarchy - the mode that you need for your scenario. There will be other improvements and performance optimizations as well. The beta edition of new RadGridView will be available soon.

Best wishes,
Julian Benkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
TonyG
Top achievements
Rank 1
answered on 27 May 2010, 04:59 PM
That's a great answer, Julian, thanks.  I look forward to the beta.

Perhaps this should be in another thread, but about the visual designer for tiers in the hierarchy - is there an example that shows how to bind selected columns of these secondary DataTables (data binding source, etc) without code-behind?  Per my example where each Customer row in a Customers DataTable may have related rows in a Notes DataTable, of course we can visually set columns for the Customers, but Notes?

And if so, might that extend to a third tier?  (Just looking for the limits...)

An example in a solution, online, or docs would really help.  Information on hierarchical grids is a time consuming hunt-n-peck endeavor.

Thanks!
0
Julian Benkov
Telerik team
answered on 02 Jun 2010, 10:04 AM
Hi TonyG,

Please refer to this online help topic which concerns the setup of the hierarchy mode. You can also take a look at our Examples application, section GridView >> Hierarchy.

Kind regards,
Julian Benkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
TonyG
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
TonyG
Top achievements
Rank 1
Share this question
or