Show selected items as tool tip

2 posts, 0 answers
  1. Joy
    Joy avatar
    1 posts
    Member since:
    Jan 2012

    Posted 20 Sep Link to this post

    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.

  2. Anton
    Admin
    Anton avatar
    61 posts

    Posted 21 Sep Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top