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

Drill Down with binding to custom object

3 Answers 112 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pawz
Top achievements
Rank 1
Pawz asked on 10 Sep 2008, 06:49 AM
Hi,

I've got a question on how best to accomplish drill down on a grid. The basic user experience should be to load up the form with a grid, and then click on any row's down arrow and see the grid expand to view related records (heirarchical grid).

I've currently got it working by creating 2 lists and setting up the relationship between them. What I'm wondering is if it's possible to set it up so that I can call the child object in the datasource to be the sub grid.

eg
Order has a property called 'OrderItems' which contains a list of all order items. In order to display on a grid, I need to call seperately a 'GetOrders' and a 'GetOrderItems', and then put the two together.

How would I get the grid to use Order.OrderItems as a data source instead? I suspect it would have to be an unbound grid, which is OK, but then I just need to know how to create a hierarchical unbound grid! Potentially it'd be nice to automatically generate a sub grid based on the properties of a sub object.

3 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 15 Sep 2008, 11:08 AM
Hi Pawz,

Currently, RadGridView does not support data loading on demand when expanding the parent row of a hierarchy level.

As a workaround, you can load the data by using one IList of objects for each level: in your case the master level contains Orders IList and child level must contain OrderItems for all Orders in one IList object. The relation between hierarchy levels is a necessary condition.

This scenario works for bound and unbound mode. You can view the RadGridView hierarchy example in our QSF for more details.

We are planning to extend this functionality and support on demand loading of data, together with automatic hierarchy generation based on bound hierarchy object.

I hope this was helpful. If you have additional questions, please contact us.

 
Kind regards,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Christian
Top achievements
Rank 1
answered on 26 Mar 2009, 12:15 PM
Hi,
after reading the information for your last update I can't find any part to this feature.
We use Openaccess and our hole data model based on classes and generic lists. It would be nice, if we can put the possibilities of navigate in hierarchical structure to our users without a complex software in the background.

Thanks for any hints.
Christian
0
Nikolay
Telerik team
answered on 30 Mar 2009, 04:27 PM
Hello Christian,

Thank you for the feedback.

Indeed, it will be a good feature for RadGridView to build a hierarchy of lists of objects which have properties of type other objects. However, we still do not support this feature since we have a very tight schedule concerning other important features and fixes. We understand that this feature is important for our customers and will implement it at the first possible moment.

Regards,
Nikolay
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Pawz
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Christian
Top achievements
Rank 1
Share this question
or