Wrap Rad Editor in Custom WebPart

2 posts, 0 answers
  1. anders
    anders avatar
    2 posts
    Member since:
    Oct 2008

    Posted 05 Oct 2009 Link to this post

    Hi, is it somehow possible to wrap the RadEditor in a custom webpart, using it as a regular UI control? I have tried using the Telerik.SharePoint.RadHtmlField  as

    public class MyWebPart : WebPart, IWebEditable

    {

      protected override void CreateChildControls()

      {

        RadHtmlField   uiEditor = new RadHtmlField();

        uiEditor.Content = EditorText; \\public property

        Controls.Add(uiEditor);

     

    But I get an Exception:

    The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.

    What can I do?

  2. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 07 Oct 2009 Link to this post

    Hello Anders,

    If you are using the full version of the RadEditor for MOSS you can use the MOSSRadEditor class, which is defined in the Telerik.SharePoint namespace. How ever if you are using the Lite (free) version of the control the MOSSRadEditor class has no public constructors.

    Best wishes,
    Stanimir
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

Back to Top