HtmlDataProvider binding error after Q1 2015 update

4 posts, 0 answers
  1. Sergey
    Sergey avatar
    3 posts
    Member since:
    Apr 2015

    Posted 06 Apr 2015 Link to this post


    In one of the projects of our solution, I’m getting the following error when binding HtmlDataProvider to RadRichTextBox:

    Value cannot be null. Parameter name: formatProvider
    The invocation of the constructor on type 'Telerik.Windows.Documents.FormatProviders.Html.HtmlDataProvider' that matches the specified binding constraints threw an exception. [Line: 386 Position: 55].

    That exception seems to be thrown from the constructor of DataProviderBase and I get it even if I switch to TxtDataProvider. It doesn’t help that the same
    binding works in other projects of the same solution :(

    Version that worked before updating to 2015.1.0401.1050 NoXaml – 2014.3.1024.1050 NoXaml
    All references set according to

    Here’s what I have left in the user control:

    <UserControl x:Class="Cebos.Veyron.Search.Views.Details.EmailView"
        <Grid Background="White">
            <telhtml:HtmlDataProvider Html="{Binding HtmlContent, Mode=TwoWay}" RichTextBox="{Binding ElementName=HtmlRichTextBox}" />
            <telerik:RadRichTextBox x:Name="HtmlRichTextBox" />

    Thank you,

  2. Petya
    Petya avatar
    983 posts

    Posted 09 Apr 2015 Link to this post

    Hello Sergey,

    The data providers rely on format provider instances registered when the control is loaded. This happens with the help of MEF and it is possible that the provider hasn't been registered yet. In previous versions of the control this would simply silently fail and the binding wouldn't work, but in the resent release we tried to make sure the users are notified about the error.

    Try setting the TypeCatalog needed by MEF from this article and see if the issue persists.

    I hope this helps.


    See What's Next in App Development. Register for TelerikNEXT.

  3. Sergey
    Sergey avatar
    3 posts
    Member since:
    Apr 2015

    Posted 09 Apr 2015 in reply to Petya Link to this post

    Hello Petya,

    Thank you so much, that was indeed the issue!
    We were initializing Telerik catalog inside of our own OnImportsSatisfied() which was too late.

    One remaining minor issue in this release (or in our code?) is that we had to reference Telerik.Windows.Documents.dll in order to use txt provider and this dll exposes System.Serializable, so I had to use 'extern alias' to work around it.

    Thank you again,

  4. Sergey
    Sergey avatar
    3 posts
    Member since:
    Apr 2015

    Posted 10 Apr 2015 in reply to Sergey Link to this post

    Just FYI,

    Last issue fixed by using Telerik Document Processing Library from Telerik UI for ASP.NET AJAX.



Back to Top