Multiple levels of MergeField?

2 posts, 0 answers
  1. Mari
    Mari avatar
    1 posts
    Member since:
    Mar 2013

    Posted 26 Mar 2013 Link to this post


    We are currently checking out Telerik controls to be used for our new project. Are the points below feasible?
    1. Can we have a mergefield that is a Dictionary?

    Ex. We have an Item class with a Dictionary property. Now, I want a mergefield that points to the keys of the the Dictionary property.

        <MERGEFIELD BeerBrands["Bud"]> or <MERGEFIELD BeerBrands.Bud>
        where Beerbrands = class property w/ch is a Dictionary
          Bud is the Key of the dictionary.  The result should be the value of the dictionary.

    2. Taking this a step further, can we have a mergefield where the fieldName points to a Dictionary<string, new Dictionary<string, string>>.
        Ex. <MERGEFIELD BeerBrands.Bud.Price>

       where Beerbrands = class property w/ch is a Dictionary;
             Bud = key of the 1st Dictionary;
             Price = key of the 2nd dictionary

  2. Boby
    Boby avatar
    631 posts

    Posted 28 Mar 2013 Link to this post

    Hi Mari,
    The syntax of the property path of merge fields is the same as the one used in the data bindings, described here. If this doesn't fit your scenario, you could relatively easy create custom merge fields which resolve PropertyPath property in custom way, for example as described in this forum thread.

    You can also check the mail merge help article and demo application.

    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top