Sliding Panelbar w/Tooltip

3 posts, 0 answers
  1. Jeff Snyder
    Jeff Snyder avatar
    22 posts
    Member since:
    Dec 2007

    Posted 29 May 2008 Link to this post

    Hi,

    I'm using the sliding panelbar for main navigation throughout my site.  Since PanelItems do not allow for an ID property in the ASPX page, I have added client IDs to the panel items in the code behind:

    Dim Item As RadPanelItem  
    Dim SubItem As RadPanelItem  
    Dim S As Integer = 1   
       
    For Each Item In RadPanelbar1.Items  
        Item.Attributes.Add("id","panel" + CStr((Item.Index + 1)))   
        For Each SubItem In RadPanelbar1.Items(Item.Index).Items   
            SubItem.Attributes.Add("id""subpanel_s" + CStr(S) + "_" + CStr((Item.Index + 1)))   
        Next 
        S = S + 1      
    Next 
     

    Here's a line of code that attaches a tooltip to one of the panel items:

    <telerik:RadToolTip Position="MiddleRight" Sticky="true" RelativeTo="Element" ID="RadToolTip1" runat="server" IsClientID="true" TargetControlID="panel1">  
        Explore status of unit(s) against the current timeline.  
    </telerik:RadToolTip> 

    The tooltip does not display for the panel item in question.  What am I doing wrong?

    Thanks
    Jeff
  2. Jeff Snyder
    Jeff Snyder avatar
    22 posts
    Member since:
    Dec 2007

    Posted 29 May 2008 Link to this post

    After stepping through the code, I found that the client ID is being assigned internally by your code.  I was able to set the ToolTip based upon the naming conventions that the RadPanelBar uses.  Just curious - why don't we have access to the client ID within the ASPX page?
  3. Rosi
    Admin
    Rosi avatar
    2529 posts

    Posted 02 Jun 2008 Link to this post

    Hello Jeff Snyder,

    Thanks for your question.

    ID of RadPanelBar's items are used from internal purposes.Also RadPanelBar for ASP.NET AJAX does not render IDs for the panel items in order to reduce the output size.That is the reason why we suggest using of custom attributes instead of ID property.

    Regards,
    Rosi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top