Hi,
I'm trying to get the the currently selected value of a WebDropDown when the user changes the DropDown.
In order to do that I hooked up the WebDropDowns ClientEvents ValueChangedEvent which has the parameters sender and e.
e has a method called getNewValue() which returns the text of the selected item, not the value itself.
So what I came up with is:
function
MyDropDown_ValueChanged(sender, e) {
var value = sender.get_selectedItem().get_value();
}
This seems to work but looks a little bit ugly. So I wondered if theres a more elegant way of doing it? Maybe I missed a method or a property ...
Thanks in Advance
Andre
Hey Andre,
Thanks for your feedback. Currently the way to get it is the one you have already provided in the code above :) We will consider adding a more straightforward way in the API.
Thanks again,
Angel