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

[Solved] obtaining selected text from combo

1 Answer 97 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
william
Top achievements
Rank 1
william asked on 02 Mar 2012, 01:24 PM
Hi all,
I have a populated combo and I have selected a value. Later in code, I need to obtain the selected textual value that the user sees as opposed to the id.

If I was using a standard select list I'd do something like:
var model = document.getElementById("Dropdown_Model");
 var modelVal = model.options[model.selectedIndex].text;
However, with the telerik combo it doesn't recognise options.
How do I get the text of a previously selected combo?

1 Answer, 1 is accepted

Sort by
0
william
Top achievements
Rank 1
answered on 16 Mar 2012, 04:54 PM
the answer is

 

 

$("#Dropdown_Model").data("tComboBox").text()

 

Tags
ComboBox
Asked by
william
Top achievements
Rank 1
Answers by
william
Top achievements
Rank 1
Share this question
or