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

[Solved] Using RadEditor within a custom web part

1 Answer 60 Views
RadEditor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tim Humphries
Top achievements
Rank 1
Tim Humphries asked on 12 Jul 2006, 04:19 PM

Hi, I'm trying to use the RadEditor within a custom web part. I don't want to use the editor as a separate web part on the page, simply as a control within the web part.

I am trying to add the editor to the controls collection of the web part so (within CreateChildControls):

telEditor =
new RadEditor();
... property sets
telEditor.Editable = true;
telEditor.EnableViewState =
true;
telEditor.ID = "radEd1";

Controls.Add(telEditor);

This doesn't seem to cause a problem, but on rendering the web part I get an 'unexpected error' that doesn't seem trappable.

How shoud I go about using the Controls provided in the Sharepoint version within my web part?

Note I am using  VS2003 and Framework 1.1.

Thanks

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 13 Jul 2006, 11:01 AM
Hello Tim,

I think the problem is that you have forgotten to set the RadControlsDir property of your radeditor.
You can copy the RadControls folder in C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS and then referring to it as "~/_layouts/RadControls". Another option is to copy that folder in the root folder of your site and then exclude it from the SharePoint managed paths using stsadm.exe. If you copy it in the layouts folder you should set the radcontrols dir property like this:

telEditor = new RadEditor();
... property sets
telEditor.Editable = true;
telEditor.EnableViewState = true;
telEditor.ID = "radEd1";
telEditor.RadControlsDir = "~/_layouts/RadControls";

If you have already installed r.a.d.editor sharepoint edition you should set the RadControlsDir to the following:
  • BIN folder deployment
    RadControlsDir = "~/wpresources/RadWebParts/RadControls/"
  • GAC deployment:
    RadControlsDir = "~/RadWebParts/2.0.1.0__1f131a624888eeed/RadControls/"

I hope that helped,
Albert
the telerik team

Tags
RadEditor
Asked by
Tim Humphries
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or