Bug: Accessing RadPanelItem's ClientID server side

7 posts, 0 answers
  1. nismo
    nismo avatar
    11 posts
    Member since:
    Aug 2014

    Posted 02 Sep 2014 Link to this post

    Hello, I have a RadPanelBar that contains a RadPanelItem, similar to the configuration below. Both are assigned IDs with runat=server.

    In my code-behind, I am trying to pass the RadPanelItem's clientID to the RadToolTipManager so that the Item will have a nice pretty tooltip on mouse over.

    However, passing the RadPanelItem's clientID to the RadToolTipManager does not enable the tooltip -- I found out that the actual RadPanelItem's ClientID is not being assigned correctly -- it appears that the RadPanelItem's ClientID is the same as the RadPanelBar. 

    I think this may be a bug, since I am able to pass literally every other control's clientID to the RadTooltipManager successfully, and have the tooltip displayed correctly.

    Please advise as to how I can pass the correct RadPanelItem.ClientID to the RadTooltipManager.

    ascx code:
    <telerik:RadPanelBar width="100%" ID="rdpPanelBar" runat="server" ExpandMode="MultipleExpandedItems">
                    <Items>
                        <telerik:RadPanelItem Text="Package" runat="server" Width=100% Value="PackageName" id="rdiPackage">
                            <ContentTemplate>
    ...
                            </ContentTemplate>
    </Items>
                        </telerik:RadPanelItem>
    </telerik:RadPanelBar>


    code behind (vb net)
    Dim item As RadPanelItem = rdpPanelBar.FindItemByValue("Package")
     
    Dim test = rdpPanelBarClientID & "|" & rdiPackage.ClientID
     
    RadToolTipManager1.TargetControls.Add(rdiPackage.ClientID, True)
     
    RadToolTipManager1.Text = test
  2. nismo
    nismo avatar
    11 posts
    Member since:
    Aug 2014

    Posted 02 Sep 2014 in reply to nismo Link to this post

    Forgot to add: using Telerik.Web.UI version 2014.1.225.40, testing in ie8 and latest Chrome.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. nismo
    nismo avatar
    11 posts
    Member since:
    Aug 2014

    Posted 03 Sep 2014 Link to this post

    bump
  5. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 05 Sep 2014 Link to this post

    Hi nismo,

    This panelbar definition is wrong. There unclosed tags. Please first check this.

    Regards,
    Hristo Valyavicharski
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. nismo
    nismo avatar
    11 posts
    Member since:
    Aug 2014

    Posted 05 Sep 2014 in reply to Hristo Valyavicharski Link to this post

    Hi Hristo,

    Apologies that is not the exact code I have, it was just a rough idea -- my code has the proper closed tags. The issue does remain with proper tags.
  7. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 10 Sep 2014 Link to this post

    nismo,

    Everything seems to be working as expected. Please attach sample project. In the mean time try to put your javascript in a ScriptBlock.

    Regards,
    Hristo Valyavicharski
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  8. nismo
    nismo avatar
    11 posts
    Member since:
    Aug 2014

    Posted 10 Sep 2014 in reply to Hristo Valyavicharski Link to this post

    Hristo, I figured out the problem. The RadPanelItem does not inherently have a unique client ID property, so I had to manually assign the ID property attribute before passing to the RadTooltipManager.  After doing this, I was able to successfully pass the RadPanelItem to the tooltipManager and the tooltip now properly displays.

    Dim item As RadPanelItem = rdpPanelBar.FindItemByValue("PackageName")
            Dim toolTipString = String.Empty
           toolTipString += "whatever tooltip you want"
     
            item.Attributes("id") = rdpPanelBar.ClientID + "_item"
            RadTooltipManager1.TargetControls.Add(item.Attributes("id"), True)
            RadTooltipManager1.Text = toolTipString
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017