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

Bug: Accessing RadPanelItem's ClientID server side

6 Answers 12 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
nismo
Top achievements
Rank 1
nismo asked on 02 Sep 2014, 01:55 PM
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

6 Answers, 1 is accepted

Sort by
0
nismo
Top achievements
Rank 1
answered on 02 Sep 2014, 06:27 PM
Forgot to add: using Telerik.Web.UI version 2014.1.225.40, testing in ie8 and latest Chrome.
0
nismo
Top achievements
Rank 1
answered on 03 Sep 2014, 05:10 PM
bump
0
Hristo Valyavicharski
Telerik team
answered on 05 Sep 2014, 03:02 PM
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.

 
0
nismo
Top achievements
Rank 1
answered on 05 Sep 2014, 04:02 PM
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.
0
Hristo Valyavicharski
Telerik team
answered on 10 Sep 2014, 11:37 AM
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.

 
0
nismo
Top achievements
Rank 1
answered on 10 Sep 2014, 01:16 PM
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
Tags
PanelBar
Asked by
nismo
Top achievements
Rank 1
Answers by
nismo
Top achievements
Rank 1
Hristo Valyavicharski
Telerik team
Share this question
or