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

Binding object properties in Detail section from a generic collection

2 Answers 255 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Klemen Slavič
Top achievements
Rank 2
Klemen Slavič asked on 15 Jan 2010, 11:16 AM
Hello,

I've been trying to create a mock sample data set to use on a report in design-time; basically, it's a simple class that with a public static function that returns an object with a property that contains a List generic collection containing additional objects.

When binding this object in the NeedDataSource event handler, it works when binding to the object itself; however, I implemented a SubReport in the master report to list the objects contained in the List collection. Here's where the problem gets blurry.

I implemented a NeedDataSource on the report (contained in the master report as a subreport) that assigns the List collection of objects to the report. I then use the binding syntax to bind to the object's properties, but the expression does not return a value, rather it's blank. The number of displayed table cells matches the number of objects in the List collection, but no values of fields are displayed.

Example: object in List contains the "Ime" property; neither =Ime or =Fields.Ime displays the value. Also, using just any binding expression doesn't result in an error (like =Foo).

2 Answers, 1 is accepted

Sort by
0
Chris Gillies
Top achievements
Rank 1
answered on 15 Jan 2010, 02:07 PM
Klemen, check out the following threads:

  • http://www.telerik.com/community/forums/reporting/telerik-reporting/how-to-display-hierarchical-collections.aspx
  • http://www.telerik.com/community/forums/reporting/telerik-reporting/linq-or-business-object-datasource.aspx

Cheers


0
Klemen Slavič
Top achievements
Rank 2
answered on 18 Jan 2010, 08:05 AM
Thanks, I'll look into those.
Tags
General Discussions
Asked by
Klemen Slavič
Top achievements
Rank 2
Answers by
Chris Gillies
Top achievements
Rank 1
Klemen Slavič
Top achievements
Rank 2
Share this question
or