RadComboBox tooltip

10 posts, 0 answers
  1. Ruth Dahan
    Ruth Dahan avatar
    27 posts
    Member since:
    Feb 2009

    Posted 23 Mar 2009 Link to this post

    Hi,
    How can i set RadComboBotip on the selected item text in javascript?
    All the combo items are loaded dynamically using ObjectDataSource.

    Thanks,
    Ruth.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 23 Mar 2009 Link to this post

    Hello Ruth,

    You can set the ToolTip of the RadComboBox in its SelectedIndexChanged event as shown below:
    cs:
    protected void RadComboBox1_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) 
        { 
            RadComboBox combo = (RadComboBox)o; 
           combo.ToolTip = combo.SelectedItem.Text; 
        } 

    Thanks
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ruth Dahan
    Ruth Dahan avatar
    27 posts
    Member since:
    Feb 2009

    Posted 23 Mar 2009 Link to this post

    Thanks for your reply.
    I have RadComboBox with template and i am changing the text in the combo in javascript so i can't use sever events.
    is there a way i can do this in javascript?

    Thanks!
    Ruth
  5. Basel Nimer
    Basel Nimer avatar
    94 posts
    Member since:
    Oct 2009

    Posted 31 Mar 2010 Link to this post

    i repeat the question.

    is there a way i can do this in javascript?
  6. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 31 Mar 2010 Link to this post

    Hello Basel Nimer,

    You can do the same on the client in a similar way, i.e. handle the client-side SelectedIndexChanged event in this way:

    function onSelectedIndexChanged(sender, eventArgs) {
        sender.get_element().title = eventArgs.get_item().get_text();
    }

    Regards,
    Simon
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Basel Nimer
    Basel Nimer avatar
    94 posts
    Member since:
    Oct 2009

    Posted 31 Mar 2010 Link to this post

    Thank you
    but this didnt work since i have a treeview inside the combo box

    i have a js variable that holds the combo, but i cannot set the tooltip? i tried setAttribute of title and tooltip. nothing worked.

  8. Jeff Berry
    Jeff Berry avatar
    13 posts
    Member since:
    Jun 2009

    Posted 18 Apr 2011 Link to this post

    I have the same need.  I have a RadComboBox inside a repeating control.  OnClientDropDownClosed, I want to set the ToolTip.  How can I do this?

    I just need to know how to reference the tooltip property. 

    I want to do something like this:

     

    function HandleClose(comboBox) { 
      
      comboBox.tooltip = "some custom text"; 
      
     }

     

    Please help.
  9. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 20 Apr 2011 Link to this post

    Hi Jeff,

    You can use the same code, provided that the comboBox parameter is a reference to the client-side object of the RadComboBox:
    function HandleClose(comboBox) {  
      comboBox.get_element().title. = "some custom text";  
    }

    I hope this helps.

    Best wishes,
    Simon
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  10. Mukta
    Mukta avatar
    1 posts
    Member since:
    Apr 2012

    Posted 17 Apr 2012 Link to this post

    I have rad combobox for which I am setting the tooltip on server side (only for 1st time when it loads) But after that if the selected index changes I want to change the tooltip onchange event. But it's not working.
    I used the same function is mentioned in previous post. 
    If the tooltip is not set on server side then it works fine.
    Please help..
  11. Cat Cheshire
    Cat Cheshire avatar
    128 posts
    Member since:
    Jun 2010

    Posted 17 Apr 2012 Link to this post

    Try setting the AutoPostBack property of the combobox to "true".
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017