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

Using RadEditor from RadEditor_MOSS_4_5_3.zip download in custom MOSS solutions doesn't work

6 Answers 246 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
ken
Top achievements
Rank 1
ken asked on 11 Jul 2008, 05:52 PM
Hi,

I downloaded the RadEditor_MOSS_4_5_3.zip and deployed the RadEditorMOSS solution to MOSS 2007. I followed your sample code to make a custom webpart and it doesn't work. The constructor of MOSSRadEditor is missing in RadEditorSharePoint.dll so I can't even instantiate the instance of MOSSRadEditor class. I used RadEditorMOSS_4_5_2_trial.zip and it works.
Could you please let me know what's going on?

using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;
using Telerik.SharePoint;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;

namespace Web_Part1
{
   public class Web_Part1 : System.Web.UI.WebControls.WebParts.WebPart
   {
       private MOSSRadEditor contentEditor;
       protected override void CreateChildControls()
       {
           contentEditor = new MOSSRadEditor();//this doesn't work while compiling the code
           contentEditor.Content = "Enter content...";
           base.CreateChildControls();
       }
       protected override void Render(HtmlTextWriter writer)
       {
           EnsureChildControls();
           // TODO: add custom rendering code here.
           // writer.Write("Output HTML");
       }
   }
}



Thanks,
Ken

6 Answers, 1 is accepted

Sort by
0
Troy
Top achievements
Rank 1
answered on 14 Jul 2008, 11:32 PM
The the help file section (where the sample code comes from) "Using RadEditor in custom MOSS solutions"

Did you do these steps?

It is important to add references to the RadEditor.Net2.dll and RadEditorSharePoint.dll files. To do so, you need to follow these steps:

  1. Open the RadEditor for MOSS distribution.
  2. Rename RadEditorMOSS.wsp to RadEditorMOSS.cab and open the file with Windows Cabinet Viewer.
  3. Copy RadEditor.Net2.dll and RadEditorSharePoint.dll to a convenient place on your disk.
  4. Add the references to the files in your MOSS project.

If you didn't do Step #4 you would get that error. Remember thats not a "using" statement but a "reference".
0
ken
Top achievements
Rank 1
answered on 15 Jul 2008, 12:03 AM
Thanks for your reply.
Yes, I did add them to the reference. The problem is that if you view RadEditorSharePoint.dll in Object Browser (Visual Studio 2005) by right click RadEditorSharePoint in reference and select "view in object browser" you will see all the classes in this dll. After finding MOSSRadEditor class, you will discover the constructor of this class is missing. Yes, constructor is missing in MOSSRadEditor class.

Due to the missing constructor of this class I couldn't instantiate the instance of this class. Previous version of dll still contains the constructor of MOSSRadEditor class. I don't know why you removed the constructor in current version of dll.
Again, I appreciate your reply, but the problem is that inside the current version of RadEditorSharePoint dll doesn't contain constructor of MOSSRadEditor class at all. Could you please double check again?

We're trying to purchase your product but couldn't make this current version work. Also, I posted an issue regarding to the full version in your ticket system. Please take a look at it. Your answer will help us to purchase your product.

Thanks a lot!
Ken
0
ken
Top achievements
Rank 1
answered on 15 Jul 2008, 12:09 AM
The sample code is from http://www.telerik.com/help/aspnet-ajax/radeditor-in-custom-moss-solutions.html

This section of user manual is the same among different versions.

Thanks for your help.
Ken
0
Troy
Top achievements
Rank 1
answered on 15 Jul 2008, 01:01 AM
I'm another customer not Telerik.

My RadEditor_MOSS_4_5_3_dev.zip works OK. Try another download?

BTW the line of code:
contentEditor = new MOSSRadEditor();//this doesn't work while compiling the code

Has a syntax err, there is no type defined for the variable. You not really trying to complile it exactly like that are you? It should be more like

MOSSRadEditor contentEditor = new MOSSRadEditor();//this doesn't work while compiling the code

good luck
0
Accepted
George
Telerik team
answered on 15 Jul 2008, 12:37 PM
Hi Ken,

This error is usually observed when customers use RadEditor for MOSS Light, which is provided as it is and cannot be used in custom solutions. Please make sure that you are using the full featured version of RadEditor for MOSS.


Kind regards,
George
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ken
Top achievements
Rank 1
answered on 15 Jul 2008, 05:33 PM
Thanks Troy. The complete source code is in my previous post, so there is no syntax error.

According to answer from Telerik, they removed that constructor on purpose in the lite version (at least the version I downloaded.) Thanks again for spending time answering my questions. :)
Tags
WebParts for SharePoint
Asked by
ken
Top achievements
Rank 1
Answers by
Troy
Top achievements
Rank 1
ken
Top achievements
Rank 1
George
Telerik team
Share this question
or