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

tool tip with drop down

1 Answer 188 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Wisam Mahdi
Top achievements
Rank 1
Wisam Mahdi asked on 23 Jul 2012, 04:40 AM
Hi,
can you please let me know if the tool tip is supported in the dropdown, if not can you please let me know if there is any way to show popup associated with each item in the dropdwon

thanks
Wisam

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 23 Jul 2012, 02:34 PM
Hi Wisam,

I already replied to your question in the support ticket that you have submitted on the same subject. For convenience I am pasting my reply here as well.

I am afraid that at present such functionality is not supported out of the box. As a workaround you could manually add a title attribute to the drop down <li> items, thus way a standard html tool tip will be displayed on hover. It is recommended to attach the attributes on the dataBount event of the widget: 
dataBound: function() {
    $(this.items()).each(function(index, item) {
        var model = $("#input").data("kendoDropDownList").dataItem(index);
          
        $(item).attr("title", "A sample tooltip for: " + model.text);
    });
}

For convenience I prepared a small example using this approach in action.

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
DropDownList
Asked by
Wisam Mahdi
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or