Telerik RadDocument with List Styles (Numbered list from Ribbon Menu)

2 posts, 0 answers
  1. Vishnu
    Vishnu avatar
    5 posts
    Member since:
    Sep 2013

    Posted 10 Mar 2014 Link to this post

    Hi,

    I am trying to merge one RadDocument into other, I have numbered list added to RichTextBox from Ribbon menu and after i merge this raddocument, by  below statements, i dont see the numbers in the numbered list

     aPolicyRadDocument.Selection.SelectAll();
    mergedDocumentIntroductory.InsertFragment(aPolicyRadDocument.Selection.CopySelectedDocumentElements());

    NUmbered list added to RichTextBox:

    1. Some Text
    2. Copied Text,
    After merge, i just see the below text without numbers:
     Some Text
     Copied Text


  2. Dimitar
    Admin
    Dimitar avatar
    1414 posts

    Posted 13 Mar 2014 Link to this post

    Hello Vishnu,

    Thank you for writing.

    The observed effect is caused by a known issue with the selection (the SelectAll method does not select the entire document). The issue is logged in our Feedback Portal. You can track the item for status changes and add your vote for it here.

    To workaround this you can merge the documents like this:
    private void radButton1_Click(object sender, EventArgs e)
    {
        RadDocument document = new RadDocument();
        TxtFormatProvider provider = new TxtFormatProvider();
        StyleDefinition style = radRichTextBox1.DefaultStyleSettings;
     
     
        document.Insert(provider.Export(radRichTextBox1.Document), style);
        document.InsertLineBreak();
        document.InsertLineBreak();
        document.Insert(provider.Export(radRichTextBox2.Document), style);
     
        radRichTextBox3.Document = document;
    }

    Please let me know if there is something else I can help you with. 
     
    Regards,
    Dimitar
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

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