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

onSelectedIndexChanged javascript code

1 Answer 99 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Lubna Ansari
Top achievements
Rank 1
Lubna Ansari asked on 31 Mar 2010, 02:58 PM

Hi,

I am adding a RadComboBox dynamically from code behind.
I've assisgned the onSelectedIndexChanged event to the combo. The following code is firing properly and I am getting item as object. But I need to check the selected value of combobox so that I can compare it with my string.
How to do that??

function

 

onSelectedIndexChanged(sender, eventArgs)

 

{

 

var item = eventArgs.get_item();

 

 

 

}

Regrads,
Lubna.

1 Answer, 1 is accepted

Sort by
0
Accepted
robertw102
Top achievements
Rank 1
answered on 31 Mar 2010, 03:56 PM
To get the value of the selected item you would do this:

var selectedValue = eventArgs.get_item().get_value(); 

You can view all the exposed methods for the client-side RadComboBoxItem here:


I hope that helps.
Tags
ComboBox
Asked by
Lubna Ansari
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
Share this question
or