Hi,
Is it possible to include a RadRotator inside a RadToolTipManager ?
I tryed the following code :
Code behind :
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
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