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

Radrotator inside RadToolTipManager

2 Answers 85 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
arnaud
Top achievements
Rank 1
arnaud asked on 24 Sep 2008, 12:09 AM
Hi,

Is it possible to include a RadRotator inside a RadToolTipManager ?

I tryed the following code :

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:bdConnectionString3 %>"
    </asp:SqlDataSource> 
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:bdConnectionString3 %>" 
        SelectCommand="select * from MODELES WHERE id_table=@id_table "
        <SelectParameters> 
            <asp:Parameter Name="id_table" Type="Int32" /> 
        </SelectParameters> 
    </asp:SqlDataSource> 
 
    <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Position="MiddleRight" 
        OnAjaxUpdate="OnAjaxUpdate" Skin="Web20" ManualClose="true" 
        Height="220px" Width="220px" Animation="Fade" /> 
 
    <asp:Repeater runat="server" ID="Repeater1" DataSourceID="SqlDataSource1" OnItemDataBound="repeater1_ItemDataBound"
        <ItemTemplate> 
            <asp:Image runat="server" ID="ImageBox" ImageUrl='<%# Eval("id_modele", ".../s/{0}_0.jpg") %>' 
                Style="border: solid 1px #ffc6e3;" /> 
        </ItemTemplate> 
    </asp:Repeater> 
     
    <telerik:RadRotator ID="RadRotator1" DataSourceID="SqlDataSource2" runat="server" Width="328px" Height="120px" 
        ScrollDuration="500" FrameDuration="2000" ItemHeight="118" ItemWidth="108" DataSourceID="SqlDataSource2"
        <ItemTemplate> 
            some images  
        </ItemTemplate> 
    </telerik:RadRotator> 

Code behind :

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
        SqlDataSource1.SelectCommand = "select * from MODELES where annee='2009' and id_cl = '" & Request.QueryString("id_cl") & "'" 
 
    End Sub 
    Protected Sub repeater1_ItemDataBound(ByVal sender As Object, ByVal e As RepeaterItemEventArgs) 
        If e.Item.ItemType = ListItemType.AlternatingItem OrElse e.Item.ItemType = ListItemType.Item Then 
            Dim ctrl As Control = DirectCast(e.Item.FindControl("ImageBox"), Control) 
            Dim rowView As DataRowView = DirectCast(e.Item.DataItem, DataRowView) 
            If Not [Object].Equals(ctrl, Nothing) Then 
                ctrl.ID = rowView.Row("id_table").ToString() 
                Dim clientID As String = ctrl.ClientID 
                Me.RadToolTipManager1.TargetControls.Add(clientID, rowView.Row("id_table").ToString(), True) 
            End If 
        End If 
    End Sub 
    Protected Sub OnAjaxUpdate(ByVal sender As Object, ByVal args As ToolTipUpdateEventArgs) 
        args.UpdatePanel.ContentTemplateContainer.Controls.Add(Me.RadRotator1) 
        SqlDataSource2.SelectParameters("id_table").DefaultValue = args.Value 
        'Me.RadRotator1.DataBind() 
    End Sub 

So the aim is to have a tooltip on all the repeaters images. Each tooltip must contain 'RadRotator1' (RadRototar1 content depending of the selected image).

I tryed to put a formiew as I saw in one of your tutorial (instead of the Radrotator) and it works. However if I use a RadRotator, the tooltip remains blank on ajax loading.

Could you help ?
Thank you
Regards
AB





2 Answers, 1 is accepted

Sort by
0
arnaud
Top achievements
Rank 1
answered on 25 Sep 2008, 01:10 PM
Right .... to be more explicit ... I want to reproduce your example : http://demos.telerik.com/ASPNET/prometheus/ToolTip/Examples/LoadLargeFiles/DefaultCS.aspx

But instead of using a formview, I want to include a RadRotator.

Is it possible or not ?

Ty,
Ab
0
Georgi Tunev
Telerik team
answered on 29 Sep 2008, 11:43 AM
Hello Arnaud,

Your code seems fine and at this point I cannot tell what the reason for the problem might be - you should be able to use RadRotator in the tooltip.

Please open a support ticket and send us a small sample project (make sure it can be run locally and is not missing a database) so we can check your exact setup. Once we have a better view over your case, we will do our best to help.



Sincerely yours,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Rotator
Asked by
arnaud
Top achievements
Rank 1
Answers by
arnaud
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or