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

How to bind list data to a textbox in Telerik report designer

2 Answers 1472 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Abhishek
Top achievements
Rank 1
Abhishek asked on 23 Aug 2017, 05:46 AM

I am using Telerik report in Visual studio and the structure of my datasource is as below :

<p>    public class Consignment<br>    {<br>        public DeliveryNoteLabels Labels { get; set; }<br>        public Details Ddepot { get; set; }<br>        public Company Company { get; set; }<br>        public Details ODepot { get; set; }<br>        public Details CollectionDetails { get; set; }<br>        public Details Customer { get; set; }<br>        public List<Pallet> Pallets { get; set; }</p><p>      }</p>

 

Consignment is an object bound to the report. I want to print the details of Pallets (list) to either a text box or a table in the existing report. I don't want to bind only the pallets object to the report since I need other properties of the consignment. How do I achieve this ?




 

2 Answers, 1 is accepted

Sort by
0
Accepted
Squall
Top achievements
Rank 1
answered on 25 Aug 2017, 08:07 AM

You have to nest separate data item(List or Table) and set the data item Datasource with a Binding to the nested property.

In your case set Binding to the nested Table

DataSource =Fields.Pallets

and then use the available pallet fields in the table textboxes

There is an example here: http://www.telerik.com/forums/data-source-business-objects

0
Abhishek
Top achievements
Rank 1
answered on 26 Aug 2017, 12:54 PM
Thank you Squall ! It worked !
Tags
General Discussions
Asked by
Abhishek
Top achievements
Rank 1
Answers by
Squall
Top achievements
Rank 1
Abhishek
Top achievements
Rank 1
Share this question
or