RadRotater Web Part help

3 posts, 0 answers
  1. Nathan
    Nathan avatar
    2 posts
    Member since:
    Dec 2007

    Posted 19 Dec 2007 Link to this post

    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. Nathan
    Nathan avatar
    2 posts
    Member since:
    Dec 2007

    Posted 19 Dec 2007 Link to this post

    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


  3. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 20 Dec 2007 Link to this post

    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
Back to Top