RadRichTextBox slow constructor?

2 posts, 0 answers
  1. Jeremy
    Jeremy avatar
    9 posts
    Member since:
    Aug 2011

    Posted 05 Jan Link to this post


    I have a datagrid that loads richtext as part of a celltemplate. The number of rows is < 20 however the performance is less than ideal ~5sec to render.

    I have narrowed it down to the constructor of the RadRichTextBox. The RtfDataProvider does not seem to be degrading the performance.

    I do not require the ribbon or spellcheck etc in this instance of the control however elsewhere in the application they have a full editor so any solution cannot be global.

    Any ideas on how to improve speed?




     <data:DataGridTemplateColumn Header="Commentary" Width="500">
                                                                <!--<telerik1:RtfDataProvider x:Name="rtfDataProvider"
                                                                        Rtf="{Binding Path=ValueText, Mode=TwoWay}"
                                                                        RichTextBox="{Binding ElementName=radRichTextBox}" />-->
                                                        <telerik1:RadRichTextBox MaxWidth="500" Height="70" Style="{StaticResource RichTextBoxReadOnly}"  x:Name="radRichTextBox"/>


        <Style x:Key="RichTextBoxReadOnly" TargetType="telerik:RadRichTextBox">
            <Setter Property="IsReadOnly" Value="True"/>
            <Setter Property="IsContextMenuEnabled" Value="False"/>
            <Setter Property="IsImageMiniToolBarEnabled" Value="False"/>
            <Setter Property="IsTrackChangesEnabled" Value="False"/>
            <Setter Property="IsSpellCheckingEnabled" Value="False"/>
            <Setter Property="IsEnabled" Value="True"/>

  2. Svetoslav
    Svetoslav avatar
    55 posts

    Posted 08 Jan Link to this post

    Hello Jeremy,

    Thank you for contacting us.

    Let me get straight to the question. By default, RadRichTextBox loads all the format providers in the referenced assemblies. If you don’t need them all, you could turn off the MEF and register only the used providers.  You can read more in Explicitly set the necessary types article. Or try to use the code snippet below.
    DocumentFormatProvidersManager.AutomaticallyLoadFormatProviders = false;
    this.radRichTextBox.IsSpellCheckingEnabled = false;
    this.radRichTextBox.UILayersBuilder = new UILayersBuilder();
    I hope this helps. Let me know if you need further assistance.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top