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

Teleriks Radrichtextbox word

1 Answer 37 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Gauri
Top achievements
Rank 1
Gauri asked on 21 Jan 2014, 07:27 AM
We are using your trial version .Now we face some problems for radrichtextbox
1. We save document by following code
   public void ExportContent(string defaultExtension, string filter,IDocumentFormatProvider formatProvider)
        {
            var saveFileDialog = new SaveFileDialog
            {
                DefaultExt = defaultExtension,
                Filter = filter
            };        
            saveFileDialog.FileName = wordfilepath;
                using (var outputStream = saveFileDialog.OpenFile())
                {
                    formatProvider.Export(radRichTextBox1.Document, outputStream);
                }           
        }
2 . Now when we insert picture using teleriks insert picture method .Picture is inserted and file is saved by above method.Then on another form we cannot display this image on richtextbox .So I added code to picture command as follows
string fieldName = ((RadRibbonButton)e.Source).Text;

            if (fieldName.ToUpper() == "PICTURE")
            {
                MergeField mf = new MergeField();
                mf.PropertyPath = fieldName;
                IncludePictureField picField = new IncludePictureField();
                picField.SetPropertyValue(IncludePictureField.ImageUriProperty, mf);
                this.radRichTextBox1.InsertField(picField);
            }
            else
            {
                radRichTextBox1.InsertField(new MergeField() { PropertyPath = fieldName });
            }
this insert image and also label PICTURE as merged field but on form where this rtf file displayed in richtextbox it shows "Cannot display image"
3. Please tell us teleriks proper method to insert image and display on richtextbox (Field merge method).We are new teleriks method.
4. Also When we create Header and footer in Teleriks editor and save file in rtf. When this rtf file loaded again it doesn't shows header and footer .Please tell me reason behind this.



1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 23 Jan 2014, 04:16 PM
Hi Gauri,

Thank you for your interest in Telerik RadRichTextBox.

The method you are using to insert IncludePictureFields in a document is the suggested one and should be working without any issues. We tested similar setups, but were unable to replicate the issue you are observing. Same applies for the issue mentioned in 4. - headers and footers seem to be serialized properly to RTF.

Please find attached the sample project we used to troubleshoot this. The version I used was the latest official release - 2013 Q3 S1. Could you please try the project and share with us the version of RadControsl you are using?

We are looking forward to your reply.

Regards,
Yancho
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
RichTextBox
Asked by
Gauri
Top achievements
Rank 1
Answers by
Missing User
Share this question
or