This is a migrated thread and some comments may be shown as answers.

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

1 Answer 135 Views
RichTextBox (obsolete as of Q3 2014 SP1)
This is a migrated thread and some comments may be shown as answers.
Vishnu
Top achievements
Rank 1
Vishnu asked on 10 Mar 2014, 10:37 PM
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


1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 13 Mar 2014, 05:01 PM
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.

 
Tags
RichTextBox (obsolete as of Q3 2014 SP1)
Asked by
Vishnu
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or