How access to a Dictionary Values with Key

2 posts, 0 answers
  1. Simon
    Simon avatar
    85 posts
    Member since:
    Sep 2018

    Posted 21 Aug 2019 Link to this post


    how can I access to the value of a dictionary with the specification of the key?

    The dictionary, named as OperationalTravelIncidentalCostSummary, has the key OperationalTravelIncidentalCostType.Hotel, and

    OperationalTravelIncidentalCostType is from type enum.

    I have tried the following, but... Error.     

    = Fields.OperationalTravelIncidentalCostSummary[OperationalTravelIncidentalCostType.Hotel]
  2. Neli
    Neli avatar
    335 posts

    Posted 26 Aug 2019 Link to this post

    Hello Simon,

    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 example, you can add a List item to the report and set its DataSource to be Fields.OperationalTravelIncidentalCostSummary.

    For more information, check How to Databind to Collection Properties KB article. Additionally, you might find helpful this forum post that has attached video, demonstrating the approach: Dictionary object for objectdatasource.

    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
Back to Top