Is there a way to import more than one RadDocument into a RichTextBox control in code?
Also what is the easiest way to insert text into a RadDocument in code (to put a timestamp at the footer or something like that) ?
3 Answers, 1 is accepted
answered on 17 Mar 2011, 06:03 PM
You can have only one document in RadRichTextBox. If you have several files, you can import them into separate documents and then "merge" them into one as described in the the last post in this forum thread.
If you would like to insert a smaller piece of text at a random position in a document, you can use the rich text box's Insert method, which inserts text at the current caret position with the style of the span at the place in the document where you insert the text. If you like, you can also use the InsertInline method and pass a new Span as a parameter. You can set the span's Text and customize its style.
You can also manipulate the caret position before invoking the insert methods in order to change the position where you wish the text to appear. You can find more information on document positions and their usage here.
If you need further assistance, do not hesitate to get back to us.