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

RadGrid with Master-Details

2 Answers 345 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Andy asked on 18 May 2014, 02:48 PM
Hi Friends,

I am using the Telerik RadGridView. I need to show a list of master records and on expansion I need to show the detail of child records. Do you have any such sample. What will be the class structures with MVVM approach.

Right now I have a - GridViewModel - that has an ObservableCollection of GridRowViewModels (master records). GridRowViewModels is set to the ItemsSource property of the Gridview. 

Now on expansion, I need to display an ObservableCollection that I am exposing through GridRowViewModel in the expanded section.

Please help.



2 Answers, 1 is accepted

Sort by
0
Boris
Telerik team
answered on 20 May 2014, 10:34 AM
Hello Andy,

I attach a sample project that suggests a possible approach for using MVVM and how you can set the RowDetailsTemplate property of the GridView.

For more information you can check:
- our Row Details documentation section.
- our Hierarchical GridView documentation section.
- our demos for WPF / Silverlight (some are in the Hierarchy section).
- our SDK examples.

I hope this helps.

Regards,
Boris Penev
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
herb
Top achievements
Rank 1
Veteran
Iron
answered on 20 Nov 2020, 07:35 PM

Hello Boris,

Found your sample very informative and it helps explain how to use the GridView. On the Telerik Demo application it has a topic "Grid View | Exporting to Xlsx and PDF" that will address a coming project. I tried to merge its sample code with yours but it breaks your code. Is there way to you can guide me to add the "export" with excel grouping to your code to test and understand the operation?

Tags
GridView
Asked by
Andy
Top achievements
Rank 1
Answers by
Boris
Telerik team
herb
Top achievements
Rank 1
Veteran
Iron
Share this question
or