RadRichTextBox in DataTemplate - DataProvider binding does not work

2 posts, 0 answers
  1. Dmitry
    Dmitry avatar
    29 posts
    Member since:
    Apr 2011

    Posted 03 Jul 2014 Link to this post


    I have a RadRichTextBox inside a DataTemplate, and I have HtmlDataProvider inside RadRichTextBox.Resources section bound to it. But for some reason this does not work, error message is:
    System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=RichTextBox'. BindingExpression:(no path); DataItem=null; target element is 'HtmlDataProvider' (Name=''); target property is 'RichTextBox' (type 'RadRichTextBox')

    I can bind provider with radrichtextbox after both controls are initialized, but I want to do that in XAML.
    Is there a way to accomplish this task?

    (Also I could not attach sample project, because only image files are allowed)...
  2. Petya
    Petya avatar
    989 posts

    Posted 08 Jul 2014 Link to this post

    Hi Dmitry,

    Please move the data provider in the visual tree, rather than in the resources of RadRichTextBox as this is most likely the cause of the observed issue. If this does not help please open a support ticket and send us the project, so that we can look into it on our end.

    Let me know how it goes.

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Back to Top