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

2 posts, 0 answers
  1. Buddha
    Buddha avatar
    2 posts
    Member since:
    Dec 2012

    Posted 24 Sep 2014 Link to this post

    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
  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 26 Sep 2014 Link to this post

    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.

     
Back to Top