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

build an hierarchical grid with nested detail out of a class instance

1 Answer 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marcel Keller
Top achievements
Rank 1
Marcel Keller asked on 01 Mar 2013, 12:43 AM
Hi there,

with Telerik it is rather easy to bind a custom class to a radGrid. But for now I do spend hours of research on how to visualize the hierarchy of my class!

Let's assume, we're having this class structure:
class MasterRecord
{
    public string Title { get; set; }
    public string Description { get; set; }
    public List<SlaveRecord> SlaveRecords { get; set; }
    public SlaveRecord SingleRecord { get; set; }
}
 
class SlaveRecord
{
    public string Title { get; set; }
    public string Description { get; set; }
}


If I bind a list of <MasterRecord> to the datasource, all my entries show up in the grid (two columns: Title; Description ), but I can't manage to show up the SlaveRecords or even the SingleRecord!

I've tried a lot of stuff so far, but nothing gets it to work as expected. If I'm in the context of a NestedViewTemplate I'm able to Eval() on the current child, but it doesn't get connected with another radGrid.

Hope, someone could help me here, as all i want to achieve is a basic property grid / property editor.

Regards

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 06 Mar 2013, 06:42 AM
Hello,

In order to achieve your goal you should define first the nested TableView and then assign a datasource to it. You could check this online demo application which illustrates similar approach.

Greetings,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Marcel Keller
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or