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

RadToolTip inside RadComboBox

1 Answer 109 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Pete
Top achievements
Rank 1
Pete asked on 12 Aug 2009, 06:12 AM
Hi,

I have a project with a RadComboBox which contains a list of items which each require a tooltip that shows an image and some text. I have used the example provided at http://www.telerik.com/support/kb/aspnet-ajax/tooltip/radtooltip-for-radcombobox.aspx 

However because my lists are created at runtime I ended up using the information on how to do a runtime template for list items provided at http://www.telerik.com/help/aspnet/combobox/combo_templates_runtime.html

The list is now working and showing tooltips, however the issue I have is that the tool tips are all wider (and in some cases higher) than the drop down section of the list, however the tooltip remains "inside" the drop down thus making it hard to read the tooltip (it also causes scroll bars on the drop down to appear, but I don't want users to have to scroll within the drop down just to view the tool tip). Is it possible to make the tool tip "break out" of the drop down?

The InstantiateIn for the template is currently:
public void InstantiateIn(Control container)  
{  
    Panel pnl = new Panel();  
    pnl.ID = "ElementContainerPnl";  
    pnl.CssClass = "elementListItem";  
 
    Label elementName = new Label();  
    elementName.ID = "ElementName";  
    elementName.DataBinding += new EventHandler(elementName_DataBinding);  
      
    RadToolTip toolTip = new RadToolTip();  
    toolTip.ID = "ElementToolTip";  
    toolTip.TargetControlID = elementName.ID;  
 
    Image img = new Image();  
    img.ID = "ElementToolTipImage";  
    img.DataBinding += new EventHandler(img_DataBinding);  
 
    Label toolTipText = new Label();  
    toolTipText.ID = "ElementToolTipText";  
    toolTipText.DataBinding += new EventHandler(toolTipText_DataBinding);  
 
    toolTip.Controls.Add(img);  
    toolTip.Controls.Add(toolTipText);  
 
    pnl.Controls.Add(elementName);  
 
    container.Controls.Add(pnl);  
    container.Controls.Add(toolTip);  

Any ideas?

Thanks

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 14 Aug 2009, 11:09 AM
Hi Pete,

What I can assume is that the problem comes form the fact that the tooltip is rendered as a child of the item and in ordre to get it outseide it if needed, you should force it to render as a child of the form. Would you please try setting RenderInPageRoot="true" and test again? More information about this property is available in the demo below:
http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltipasformchild/defaultcs.aspx


Best wishes,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
ToolTip
Asked by
Pete
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or