Event When Highlighting an Item

5 posts, 0 answers
  1. kencox
    kencox avatar
    106 posts
    Member since:
    Oct 2002

    Posted 31 Dec 2009 Link to this post

    Is there a way to get an event when the user scrolls from one combobox item to another? I know there are events when the user selects an item, but what about when the highlight comes on?
    I'd like to display some additional data related to the item that is highlighted.


  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 31 Dec 2009 Link to this post

    Hi Ken,

    You can attach mouseover event to the items in the combobox and then display corresponding data accordingly. Checkout the example below.


        protected void RadComboBox1_Load(object sender, EventArgs e) 
            foreach (RadComboBoxItem item in RadComboBox1.Items) 

        function itemMouseover(text) { 
            var lbl = document.getElementById("Label1"); 
            lbl.innerHTML = text; 

    Happy New Year!  :)
  3. VitorBarao
    VitorBarao avatar
    5 posts
    Member since:
    Feb 2008

    Posted 02 Sep 2011 Link to this post

    I was having the same question, and stumble upon this thread.

    But I could not help to notice: This Guru takes 5 minutes of his time on a new year's eve, answers the question correctly, whishes him a happy new year and not even a "Thank you" :)

    Thanks Shinu!
  4. David Samson
    David Samson avatar
    2 posts
    Member since:
    May 2007

    Posted 13 Mar 2014 in reply to Shinu Link to this post


    I've the same requirement but the difference is.

    I have two RadComboBoxes on the bases of 1st combo box's selection I am filling 2nd combo box and I have to display title (attribute: title) of the 2nd combo box item to asp:label.

    It is working fine but when I am not selecting anything and simply hovering on 2nd combo box and then returning to change 1st combo box's value it is giving me error. I have attached that screenshot for your understanding purpose.

    Is there anything I am doing wrong?

    Below is my code:

    <telerik:RadComboBox ID="rcbQue4" MaxHeight="200px" ExpandDirection="down" EnableVirtualScrolling="true"
        runat="server" Width="205px" AutoPostBack="true" OnSelectedIndexChanged="rcbQue4_SelectedIndexChanged"
    <telerik:RadComboBox ID="rcbQue5" Enabled="false" MaxHeight="200px" ExpandDirection="down" EnableVirtualScrolling="true"
        runat="server" Width="205px" AutoPostBack="true" OnItemDataBound="rcbQue5_OnItemDataBound" OnSelectedIndexChanged="rcbQue5_SelectedIndexChanged"></telerik:RadComboBox>
    <asp:Label ID="lblQue6Comment" runat="server" Text="" CssClass="que6Comment"></asp:Label>
    <asp:HiddenField ID="hdnQue6Comment" runat="server" value="" />
    <span id="rcbQue5Err" class="errSpan"></span>

    protected void rcbQue5_OnItemDataBound(object sender, RadComboBoxItemEventArgs e)
        if (e.Item is RadComboBoxItem)
            string strDefinition = String.Empty;
            ((RadComboBoxItem)e.Item).Attributes.Add("onmouseover", "javascript:return rcbQue5_OnMouseOver(this);");
            ((RadComboBoxItem)e.Item).Attributes.Add("title", strDefinition);
  5. Hristo Valyavicharski
    Hristo Valyavicharski avatar
    975 posts

    Posted 18 Mar 2014 Link to this post


    Are these combos inside an Ajax panel? If so try to disable it. Debug the code in the server event of both combos. Are there any server errors?

    Hristo Valyavicharski

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

Back to Top