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

RadComboBox tooltip

9 Answers 344 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Ruth Dahan
Top achievements
Rank 1
Ruth Dahan asked on 23 Mar 2009, 08:11 AM
Hi,
How can i set RadComboBotip on the selected item text in javascript?
All the combo items are loaded dynamically using ObjectDataSource.

Thanks,
Ruth.

9 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Mar 2009, 09:54 AM
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.
0
Ruth Dahan
Top achievements
Rank 1
answered on 23 Mar 2009, 11:59 AM
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
0
Basel Nimer
Top achievements
Rank 2
answered on 31 Mar 2010, 10:39 AM
i repeat the question.

is there a way i can do this in javascript?
0
Simon
Telerik team
answered on 31 Mar 2010, 11:45 AM
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.
0
Basel Nimer
Top achievements
Rank 2
answered on 31 Mar 2010, 12:29 PM
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.

0
Jeff Berry
Top achievements
Rank 2
answered on 18 Apr 2011, 10:08 PM
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.
0
Simon
Telerik team
answered on 20 Apr 2011, 04:26 PM
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.

0
Mukta
Top achievements
Rank 1
answered on 17 Apr 2012, 05:02 AM
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..
0
Cat Cheshire
Top achievements
Rank 1
answered on 17 Apr 2012, 10:20 AM
Try setting the AutoPostBack property of the combobox to "true".
Tags
ComboBox
Asked by
Ruth Dahan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Ruth Dahan
Top achievements
Rank 1
Basel Nimer
Top achievements
Rank 2
Simon
Telerik team
Jeff Berry
Top achievements
Rank 2
Mukta
Top achievements
Rank 1
Cat Cheshire
Top achievements
Rank 1
Share this question
or