view than print mail merge resulting document

3 posts, 1 answers
  1. Kenneth
    Kenneth avatar
    104 posts
    Member since:
    Apr 2014

    Posted 12 May 2014 Link to this post

    evaluating the richtextbox editor Q1 2014 for silverlight.

    I want to allow the user to select a mail merge template for a list I will provide and mailmerge it with a datasource I will provide and display the result in the richtextbox editor, which the user will then presumably print.

    I'm not sure how to do that, but I did see that when the user 'manually' performs a mailmerge print is not an option, only save as a file.
  2. Answer
    Yancho avatar
    72 posts

    Posted 14 May 2014 Link to this post


    The scenario which you have described is a feasible one by using RadRichTextBox's Mail Merge functionality. I would recommend you to check the SDK MailMerge sample project. Please be aware that when the document is changed in the control, the ItemsSource property of the MailMergeDataSource should be set anew.

    As to printing, by default the control would print the current displayed mail whereas the mail merge command bound to the ribbon invokes a save for the merged document. In a nutshell, if you want to print the whole mail merged document, you would need to create a new RadDocument by using the RadRichTextBox MailMerge() method, show the result back into the editor and call RadRichTextBox Print() method. The following code-snippet illustrates how this could be achieved:
    RadDocument mergedDocument = this.radRichTextBox.MailMerge();
    this.radRichTextBox.Document = mergedDocument;
    this.radRichTextBox.Print("My document", PrintMode.Native);

    Also, please take a look at this help articles for a reference about Printing and Mail Merge functionalities.

    I hope this helps! Let me know how it goes.

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. Kenneth
    Kenneth avatar
    104 posts
    Member since:
    Apr 2014

    Posted 12 Aug 2014 in reply to Yancho Link to this post

    works perfect;y, thanks.
Back to Top