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

tooltips on dropdownlist

3 Answers 127 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
appdev
Top achievements
Rank 1
appdev asked on 10 Nov 2008, 03:25 PM
i'm trying to apply this tooltips control to the drop down list, but the thing is that my dropdown is dynamic, it populates by database. so now my ddl has this for example
1
2
3
4
5

what i wnat to do is when you hover mouse a value on the ddl, it will pop up a description of what the value means on the ddl. how do i do that anyone help would really appreciate it.

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 10 Nov 2008, 04:06 PM
Hello Duy,

The standard asp DropDownList control cannot can not be configured to display even the plain [browser] tooltip due to having OPTION elements in its HTML representation and the OPTION element is not a real HTML object.

Tooltipifying a RadComboBox, however, is possible and pretty easy and I recommend to use it instead - you can find detailed information about possible approaches here.

Regards,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
appdev
Top achievements
Rank 1
answered on 11 Nov 2008, 01:53 PM
so how do you assign a tooltip to this radcombobox, item by item base on the database rows. thanks

say i have dropdown as
1 when i click on 1 a tool tip popup whatever the description is in the database correspond to item 1 .
2
3
4
5

thank you.
0
Svetlina Anati
Telerik team
answered on 12 Nov 2008, 02:56 PM
Hi Duy,

Did you read the article I provided and did you test the demo project attached there? The first approach is exactly what you are asking for - in order to achieve the desired behavior you should simply put a RadToolTip control in the Item Template of the RadComboBox as shown below:

  <telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="AccessDataSource1" 
            DataTextField="ContactName">  
            <ItemTemplate> 
                <asp:Label runat="server" ID="Label1" Text='<%# Eval("ContactName")%> '></asp:Label> 
                <telerik:RadToolTip ID="RadToolTip1" runat="server" Width="100" Height="10" TargetControlID="Label1" 
                    Position="BottomRight" Text='<%# Eval("ContactName")%>'>  
                </telerik:RadToolTip> 
            </ItemTemplate> 
            <CollapseAnimation Duration="200" Type="OutQuint" /> 
        </telerik:RadComboBox> 

If you still experience problems, please provide a more detailed explanation of the problem itself.

Sincerely yours,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ToolTip
Asked by
appdev
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
appdev
Top achievements
Rank 1
Share this question
or