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

RadRichTextBox binding with Sharepoint

1 Answer 54 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Dee
Top achievements
Rank 1
Dee asked on 23 Apr 2013, 01:41 PM
Hi,
I'm working on a Silverlight-Webpart for SharePoint 2010 and need to display the value of a Sharepoint-RichtextField with Telerik RadRichTextBox. The value i get from the SharePointField is a string that, for example, looks like this one:
<div class="ExternalClassE5958014B77E48BFA7FE351033E01472"><p><span style="font-size:18pt">​ Programming SharePoint 2010 Modal Dialog – Part 1</span><br style="font-size:18pt" /><img width="563" height="480" alt="Hydrangeas.jpg" src="/SiteAssets/Lists/ProzessTexte/EditForm/Hydrangeas.jpg" style="margin:5px;width:195px;height:146px;font-size:18pt" /><br />All about Modal Dialog in SharePoint 2010</p>
<div class="entry"><div>This article will try to summarize all information required to work with modal dialogs in SharePoint 2010</div>
<h3>To display a modal dialog and load a page..</h3></div></div>

Now I need to bind that value to RadRichTextBox (as read-only) using the ViewModel for Silverlight.
How can i accomplish this assignment.

Thanks,
Dee


1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 25 Apr 2013, 08:15 AM
Hello Dee,

RadRichTextBox uses data providers in order to be able to bind its content to string properties in different formats. HtmlDataProvider in particular is used to bind the document to strings in HTML format.

For more information on data providers, please refer to this article.

When it comes to setting the RichTextBox to read only, this can be done using the IsReadOnly property of the control. 

Regards,
Iva Toteva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Dee
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or