Radrotator and the problems

6 posts, 0 answers
  1. Chris Griffin
    Chris  Griffin avatar
    18 posts
    Member since:
    May 2009

    Posted 03 Dec 2010 Link to this post

    I have a multitude of problems, but I will start with the most important.

    1)  I have a rotator that shows images that have descriptions.  On mouseover tooltip is suppose to load the description.  On every site expect the root of the site, this works.  On the root, it appears that the value being passed to the user control is getting lost in translation; for example, the value might be 18 but its passing 91.  I have copied the code sections exactly from the children sites and it still has problems.  Please help!!

    protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
          {
              this.UpdateToolTip(args.Value, args.UpdatePanel);
          }
          private void UpdateToolTip(string elementID, UpdatePanel panel)
          {
              Control ctrl = Page.LoadControl("ImageDesc.ascx");
              panel.ContentTemplateContainer.Controls.Add(ctrl);
              ImageDesc img = (ImageDesc)ctrl;
              img.IDNum = elementID;
          }
          protected void RadRotator1_ItemDataBound(object sender, Telerik.Web.UI.RadRotatorEventArgs e)
          {
              Control target = e.Item.FindControl("RadBinaryImage1");
              HiddenField id = (HiddenField)e.Item.FindControl("HiddenField2");
              HiddenField id2 = (HiddenField)e.Item.FindControl("HiddenField1");
              if (!Object.Equals(target, null))
              {
                  if (!Object.Equals(this.RadToolTipManager1, null))
                  {
                      //Add the button (target) id to the tooltip manager
                      this.RadToolTipManager1.TargetControls.Add(target.ClientID, id2.Value+id.Value, true);
     
                  }
              }
          }
    <div class="pics">
                     <telerik:RadRotator ID="RadRotator1" Enabled="false" runat="server" ItemWidth="207" Height="122"
                         ItemHeight="122" DataSourceID="SqlDataSource1" Skin="Office2007" OnItemDataBound="RadRotator1_ItemDataBound"
                         Width="620px" BorderColor="#FF3300" FrameDuration="7000">
                         <ItemTemplate>
                             <telerik:RadBinaryImage ID="RadBinaryImage1"  DataValue='<%# Eval("Image") %>' runat="server" />
                             <asp:HiddenField ID="HiddenField1" runat="server" Value='<%# Eval("ImageID") %>' />
                             <asp:HiddenField ID="HiddenField2" runat="server" Value='<%# Eval("ImageDesc") %>' />
                         </ItemTemplate>
                     </telerik:RadRotator>
                     <telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="Default"
                         runat="server" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element"
                         Skin="Office2007" Position="BottomCenter">
                     </telerik:RadToolTipManager>
                     <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:RootConnection %>"
                          
                          
                          SelectCommand="Select Top 15 Image,ImageID,ImageDesc + 'ID:'+convert(varchar(10),ImageID) as 'ImageDesc' From CMS_Header_Images Where Archive='No' and SiteID=@SiteID ORDER BY NEWID()">
                         <SelectParameters>
                             <asp:ControlParameter ControlID="RotatorSiteID" Name="SiteID" PropertyName="Value" />
                         </SelectParameters>
                     </asp:SqlDataSource>
                     <asp:HiddenField ID="RotatorSiteID" runat="server" />
                 </div>

    Again, this is proven code that works on all sites expect the root.  Any ideas will be greatly appreciated.


    UPDATE :  My latest guess is that it is a databinding problem from the datasource to the rotator. (12.3.10 10:30 CST)
  2. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 09 Dec 2010 Link to this post

    Hi Chris ,

    The approach shown in your example code is correct. This is why, the issue appears to be a problem with the datasource. Could you please debug the code and check the values set in this code?
    this.RadToolTipManager1.TargetControls.Add(target.ClientID, id2.Value+id.Value, true);


    Kind regards,
    Fiko
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Chris Griffin
    Chris  Griffin avatar
    18 posts
    Member since:
    May 2009

    Posted 09 Dec 2010 Link to this post

    Sorry...that was from my testing.

    this.RadToolTipManager1.TargetControls.Add(target.ClientID,id.Value, true);

    Still nothing, the root and the subsiotes are the exact same.  No difference in code, expect the rotator and tooltip dont match

  5. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 14 Dec 2010 Link to this post

    Hi Chris ,

    Your code looks correct and I am not quite sure what is causing the problem. Could you please send me a runnable project that shows the problem? I will debug it and do my best to provide a working solution as soon as possible.

    Greetings,
    Fiko
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  6. Chris Griffin
    Chris  Griffin avatar
    18 posts
    Member since:
    May 2009

    Posted 14 Dec 2010 Link to this post

    I can't.  The problem doesn't happen in the project when ran locally; only when the program is ran as the root for the website.  This problem doesn't happen for any subsites either (i.e. http://www.auburnalabama.org/atc ).  Its only the root (http://www.auburnalabama.org ).  Would you like me to send you a project anyway?  The code has a ton of db queries, so I am not 100% sure that this will solve anything, but will be glad to do so if u want.
  7. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 20 Dec 2010 Link to this post

    Hi Chris ,

    Could you please try to isolate the problem in a simple runnable project? Once you succeed, you need to open a new support ticket in order to send it to me. I will debug it on my side and do my best to provide you with a working solution as soon as possible.


    Greetings,
    Fiko
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017