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

Bind List of complex types to grid

3 Answers 819 Views
Grid
This is a migrated thread and some comments may be shown as answers.
GM72
Top achievements
Rank 1
GM72 asked on 14 Jan 2016, 04:04 PM

Hi,
I have a complex object like

ID 
Name
Dob
EmploymentDetailsObject
EmergencyContactObject

I want to bind this to a Kendo Grid so the ID/Name/Dob/ are the parent row and the EmploymentDetails and EmergencyContact are child rows to this parent
I return a collection of these from an API. I thought I could just bind this collection to the Grid but it doesn't seem to work?
 Can I do this? What do I need to do?

Thanks

3 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 15 Jan 2016, 10:23 AM
Hi,

Please examine the following thread that discusses similar functionality to the one you describe.



Regards,
Viktor Tachev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
GM72
Top achievements
Rank 1
answered on 15 Jan 2016, 11:10 AM

Hi,

Thanks for the answer -a no would have done!

That's a shame as this was one of the key features of your grids in asp.net and silverlight.

While I can see a limited work around for this with regard to the hierarchical grid it looks limited to one child for each parent - is this the case or can you provide an example that has multiple children per parent?

Thanks

0
Viktor Tachev
Telerik team
answered on 19 Jan 2016, 08:04 AM
Hello,


You could show a field that is a complex object using the approach from the following online example. Check out the Category field.


With that said, please note that having complex objects as data source is not available out of the box and there may be some limitations. The DataSource is designed to work with flat data.

Also, please examine the thread below that also elaborates on the matter.



Regards,
Viktor Tachev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
GM72
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
GM72
Top achievements
Rank 1
Share this question
or