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

Table Item DataBound event will fire for every item(or table row) ?

1 Answer 207 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Buddha
Top achievements
Rank 1
Buddha asked on 24 Sep 2014, 06:12 AM
Hi All,

I am new to telerik reporting. I need to create a report with the parent and child tables. i.e. a main table contains a row with a panel inside it, and inside panel I have to add four more tables based on some conditions. My question is: can I set child tables visilbilty in the parent table Item DataBound event? It seems I can't, because the event is firing only once even the parent table is binding with multiple rows. Can anyone please help on this?


Thanks,
Buddha

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 26 Sep 2014, 04:53 PM
Hello Buddha,

In general, it is not recommended to modify the report's template once the processing with data has started.

Design your report in such manner all Table items are present in the report template. For the purpose you can use nested Table items and the data-binding approaches described in the following articles: How to use the ReportItem.DataObject property in expressions and How to Databind to Collection Properties.​​

These data-binding approaches are very suitable if you work with a data model. The usage of a data model, will allow you to use the collection properties of the main business object to supply data to data items in the report. The model can be wrapped in an ObjectDataSource/ EntityDataSource/ OpenAccessDataSource component.


You can control the visibility of items via actions e.g., toggle visibility action. Consider the Crosstab/ProductSales local demo, installed by default under C:\Program Files (x86)\Telerik\Reporting <VERSION>\Examples\CSharp.


If you need further help, please open a support ticket and submit the report files, test data and details about the expected layout.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Buddha
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or