Dynamic Mailmerge?

9 posts, 0 answers
  1. Filips
    Filips avatar
    3 posts
    Member since:
    Jan 2011

    Posted 19 Nov 2011 Link to this post

    Is there a way to bind DynamicObject property bag to MailMerge.ItemSource? 
    For me, it fetches the property names correctly, but fails to get the content of it.
    Tried with ExpadoObject and Dictionary. 

  2. Boby
    Admin
    Boby avatar
    595 posts

    Posted 24 Nov 2011 Link to this post

    Hi Filips,
    We didn't manage to reproduce the problem. Please find attached a working demo that uses a list of ExpandoObject-s as data source for the mail merge operation.
    Could you please share some more details about your scenario or send us (through a support ticket) a sample project that reproduces the exception?

    Best wishes,
    Boby
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Andrew
    Andrew avatar
    5 posts
    Member since:
    Oct 2011

    Posted 27 Feb 2012 Link to this post

    I've tried your example but when I try and preview the data nothing shows up.
  5. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 01 Mar 2012 Link to this post

    Hi Andrew,

    Thank you for bringing this issue up. There is indeed a problem with ExpandoObject in Silverlight. The strange thing is that the same code works for the WPF version of RadRichTextBox and the two controls share a common code base. Boby seems to have tested it in WPF, therefore was not able to reproduce the problem.
    We have logged this issue, but it is not clear if it will be addressed for the 2012 Q1 SP1. 
    In the meantime, the only option would be to use a MailMergeDataSource with non-dynamic objects as ItemsSource.

    All the best,
    Iva Toteva
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  6. Tim
    Tim avatar
    20 posts
    Member since:
    Jan 2009

    Posted 25 May 2012 Link to this post

    Hi, 

    Have this issue been fixed? We had the same problem here when we tried to bind the Dynamic Object to the silverlight RichTextBox MailMergeDataSource.

    Thanks,

    - Ken
  7. Boby
    Admin
    Boby avatar
    595 posts

    Posted 30 May 2012 Link to this post

    Hi Tim,
    The problem was resolved; the fix is included in Latest Internal Build (downloadable from your account), and will be part of the next official release - Q2 2012, expected in June.
    Note that with dynamic objects you will be able to use only simple (single) property paths (e.g. 'PropertyName' and not 'PropertyName.OtherPropertyName').

    Regards,
    Boby
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. Ken
    Ken avatar
    3 posts
    Member since:
    Dec 2009

    Posted 30 May 2012 Link to this post

    Hi, Boby,

    I have downloaded the latest internal build and tested it. It seemed like there's a problem with the scroll bar in the radrichtextbox.
     
    It works fine if the RadRichTextBox has no scroll bar in it. But if there is a scroll bar, the buttons only work for the text NOT in the veiw area.

    Please check it out and please let me know if you want me to submit a sample project.

    Thanks,

    - Ken
  9. Ken
    Ken avatar
    3 posts
    Member since:
    Dec 2009

    Posted 31 May 2012 Link to this post

    Hi, Boby,

    After more testing, it looks like the issue may have nothing to do with the scroll bar. It's just not working consistently.

    When I test the 'preview result' using a small document with 3 or 4 merge fields, it works fine. But if I use a large document with lots of merge fields, only the last several merge fields are replaced with the actual values.

    I have also unbind the command binding of the button and do it in code behind but that didn't work at all.

    Do you have a sample project to show me how to work with ExpandoObject in Silverlight in this latest build?

    Thanks,

    - Ken
  10. Boby
    Admin
    Boby avatar
    595 posts

    Posted 04 Jun 2012 Link to this post

    Hello Ken,
    We were not able to reproduce the problem you described - we performed a test by setting a data source to an enumerable containing an ExpandoObjects and inserted some merge fields randomly in large document:
    dynamic expando = new ExpandoObject();
    for (int i = 0; i < 10; i++)
    {
        ((IDictionary<string, Object>)expando).Add("Prop" + i.ToString(), "propvalue" + i.ToString());
    }
     
    document.MailMergeDataSource.ItemsSource = Enumerable.Repeat(expando, 1);
    Do you have any additional code that modifies the document in your project? If so, you can try to isolate the problem in sample project and send it to us attached to a support ticket, so that we can investigate the issue further.

    All the best,
    Boby
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner