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

    Hi,

    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.

        Ex:
        <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

    Regards,
    Mari
  2. Boby
    Admin
    Boby avatar
    595 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,
    Boby
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top