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

View in detail section the list that is child of a class (that is a property of a class DataSource)

1 Answer 203 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Denis
Top achievements
Rank 1
Denis asked on 24 May 2019, 01:45 PM

Hello, I have these 3 classes

Public MyClass1
{
Public string Name { get; set; }
Public Class2 MyProperty { get; set; }

}

Public Class2
{
Public List<Class3> productList { get; set; }
...
}

Public Class3
{
Public int productCode { get; set; }
Public string productDescription { get; set; }
...
}

 

My Object DataSource is "MyClass1". I need to list "productList" in my DetailSection but I have some errors.

In the image below, the result expected

 

1 Answer, 1 is accepted

Sort by
0
Silviya
Telerik team
answered on 29 May 2019, 07:22 AM
Hello Mario,

In order to display the values of a property that is a collection itself, you can bind declaratively the data item's DataSource property to a given collection property from your business object and the data item will display all collection items.

For more information, please check How to Databind to Collection Properties KB article

Best Regards,
Silviya
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Denis
Top achievements
Rank 1
Answers by
Silviya
Telerik team
Share this question
or