Populate data in "Insert merge field" (Telerik editor)

3 posts, 0 answers
  1. Vitall
    Vitall avatar
    7 posts
    Member since:
    Apr 2013

    Posted 20 Apr 2013 Link to this post

    I really messed up to populate data in WPF Telerik RadRichtextbox, I'm getting dataset from WCF service named as "LetterServiceClient" and now want to populate data in "Mailing"-->"Insert merge field" dropdown, but failed to do so. For your reference i also attached a screen shot to give you a clear look. 

             telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertMergeFieldEmptyCommand}" 
             Text="Insert Merge Field" 
             telerik:ScreenTip.Title="Insert Merge Field" 

     private void bindData()
            ServiceReference1.LetterServiceClient letterservice = new ServiceReference1.LetterServiceClient();
            DataSet ds = letterservice.ExecuteTagSchema("SearchPatient");
            List<string> listTemp = new List<string>();
            int i = 0;
            foreach (DataColumn item in ds.Tables[0].Columns)
            this.ddinsert.DataContext = listTemp.ToArray();
            //this.radRichTextBox.Document.MailMergeDataSource.ItemsSource = listTemp.ToArray();
            //this.radRichTextBox.Document.MailMergeDataSource.ItemsSource= listTemp.ToArray();
  2. Petya
    Petya avatar
    973 posts

    Posted 23 Apr 2013 Link to this post

    Hello Umer,

    I am not quite sure what you mean.

    The drop down button you are refering to is automatically populated with the MailMergeDataSource.ItemsSource of the currently shown document in the editor. That said, you should uncomment that line of code in your project. 

    I am also attaching a sample project demonstrating mail merge. The items source is set in the constructor of the window, as well as in the DocumentChanged event handler in order to be set for each new/imported document.

    Let me know if I misunderstood you or you have other questions.

    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
  4. Vitall
    Vitall avatar
    7 posts
    Member since:
    Apr 2013

    Posted 23 Apr 2013 Link to this post

    Hello Petya,
    Good to see your reply. i just see your provided project but problem is in "MainWindow.xaml", some tags are missing thats why shown "Invalid Markup". I can not able to run this project, please take a look.

Back to Top