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

Show selected items as tool tip

1 Answer 27 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Joy
Top achievements
Rank 2
Joy asked on 20 Sep 2016, 08:59 AM

I have created a rad combo box. Check boxes are enabled. I want to see the names of checked items on mouse hover.

Client side coding is preferred.

1 Answer, 1 is accepted

Sort by
0
Accepted
Anton
Telerik team
answered on 21 Sep 2016, 08:40 AM
Hi Joy,

Please refer to the following example:

<form id="form1" runat="server">
    <telerik:RadScriptManager runat="server"></telerik:RadScriptManager>
    <div>
        <telerik:RadComboBox ID="RadComboBox" runat="server" CheckBoxes="True" OnClientItemChecked="onItemChecked" oncl>
            <Items>
                <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" Value="RadComboBoxItem1" />
                <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" Value="RadComboBoxItem2" />
                <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem3" Value="RadComboBoxItem3" />
                <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem4" Value="RadComboBoxItem4" />
            </Items>
        </telerik:RadComboBox>
    </div>
</form>
<script>
    function onItemChecked(sender, args) {
        var item = args.get_item(),
            isChecked = item.get_checked(),
            itemText = item.get_text(),
            element = item.get_element();
 
        if (isChecked) {
            element.title = itemText;
        } else {
            element.title = '';
        }
    }


Regards,
Anton
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
ComboBox
Asked by
Joy
Top achievements
Rank 2
Answers by
Anton
Telerik team
Share this question
or