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

RadRotater Web Part help

2 Answers 134 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
Nathan
Top achievements
Rank 1
Nathan asked on 19 Dec 2007, 11:40 PM
Dear List,

I am trying to create a web part for the rad rotator. After much trial and error I have managed to create the web part and get it to come up in the server gallery.

When I try and drag and drop the web part onto a new page I get the following error:

The "RotatorWebPart" Web Part appears to be causing a problem. RadRotator: You have not specified a template OR there is problem with your databinding expression (possibly you haven't specified a datasource or content file).

I'm not sure what this error means? The webpart I have created simply wraps the RadRotator.Net2.dll into the class.

My Complete code and confirguration is below. Any help would be appreciated.

Thanks



[RadRotatorWebPart.cs]

using

System;
using System.Collections.Generic;
using System.ComponentModel;

using

System.Text;

using

System.Web;

using

System.Web.UI;

using

System.Web.UI.WebControls;

using

Telerik.WebControls;

using

Microsoft.SharePoint;

using

Microsoft.SharePoint.Utilities;

using

Microsoft.SharePoint.WebPartPages;

using

System.Xml.Serialization;

namespace

RadRotatorWebPart.WebParts

{

[

XmlRoot(Namespace = "RadRotatorWebPart.WebParts")]

public class RotatorWebPart : Microsoft.SharePoint.WebPartPages.WebPart

{

private RadRotator radRotator;

override protected void CreateChildControls()

{

radRotator =

new RadRotator();

radRotator.ID =

"RadRotator1";

this.Controls.Add(radRotator);

}

protected override void RenderWebPart(System.Web.UI.HtmlTextWriter output)

{

EnsureChildControls();

RenderChildren(output);

}

}

}

In my web part file I have added the sharepoint dll reference: 
Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL

And I have also Referenced the RadRotator.Net2.dll: 
RadRotator.Net2, Version=2.7.1.0, Culture=neutral, PublicKeyToken=de81a6506e5a433a, processorArchitecture=MSIL


2 Answers, 1 is accepted

Sort by
0
Nathan
Top achievements
Rank 1
answered on 19 Dec 2007, 11:44 PM
I am building this into a wsp solution file and here is the makeup of these files

[manifest.xml]

<?

xml version="1.0" encoding="utf-8" ?>

<

Solution xmlns="http://schemas.microsoft.com/sharepoint/"

SolutionId="DC821995-2B38-4c5c-813D-6FB092C5731F"

DeploymentServerType="WebFrontEnd"

ResetWebServer="TRUE">

<

Assemblies>

<!--

deploy the assembly to the server’s bin directory -->

<

Assembly DeploymentTarget="GlobalAssemblyCache" Location="RadRotator.Net2.dll">

<!--

add two safe control entries to the web.config -->

<

SafeControls>

<

SafeControl Namespace="Telerik.RadRotatorUtils" TypeName="*" Safe="True" />

<

SafeControl Namespace="Telerik.RadControlUtils" TypeName="*" Safe="True" />

<

SafeControl Namespace="Telerik.WebControls" TypeName="*" Safe="True" />

</

SafeControls>

</

Assembly>

<

Assembly DeploymentTarget="GlobalAssemblyCache" Location="RadRotatorWebPart.dll">

<

SafeControls>

<

SafeControl Namespace="RadRotatorWebPart.WebParts" TypeName="*" Safe="True" />

</

SafeControls>

</

Assembly>

</

Assemblies>

<

DwpFiles>

<

DwpFile Location="RadRotator.dwp" />

</

DwpFiles>

</

Solution>


[default.ddf]

.OPTION Explicit

.Set DiskDirectoryTemplate=CDROM

.Set CompressionType=MSZIP

.Set UniqueFiles=Off

.Set Cabinet=On

;**************************************************

RadRotator.Net2.dll

RadRotatorWebPart.dll

manifest.xml

RadRotator.dwp

.Set DestinationDir=Scripts\2_7_1

Scripts\2_7_1\RadRotator.js

Scripts\2_7_1\RadTicker.js

.Set DestinationDir=images

images\arrow_in.png



[RadRotator.dwp]

<?

xml version="1.0" encoding="utf-8"?>

<

WebPart xmlns="http://schemas.microsoft.com/WebPart/v2" >

<

Title>Telerik RadRotator for MOSS</Title>

<

Description>RadRotator Web Part</Description>

<

Assembly>RadRotatorWebPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0097a87667f95598</Assembly>

<

TypeName>RadRotatorWebPart.WebParts.RotatorWebPart</TypeName>

<

TitleIconImageUrl>/images/arrow_in.png</TitleIconImageUrl>

</

WebPart>



And of course I deploy the RadRotator.Net2.dll and my own dll that I wrote, RadRotatorWebPart.dll.

Thanks

0
Peter
Telerik team
answered on 20 Dec 2007, 02:16 PM
Hi Nathan,

You need to define a frame template for RadRotator. You can do so programmatically as show in the help topic on How to Create RadRotator Programmatically.


All the best,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Sharepoint Integration
Asked by
Nathan
Top achievements
Rank 1
Answers by
Nathan
Top achievements
Rank 1
Peter
Telerik team
Share this question
or