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

[Solved] _oldIndex same as _selectedIndex

1 Answer 107 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 16 Sep 2014, 01:44 PM
Hi,

I have a function attached to the change event of a dropdown list yet when I am selecting a different option and my function is being called the old and selected values of the sender property are the same.

Regards

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 17 Sep 2014, 08:56 AM
Hello John,

The "_oldIndex" and "_selectedIndex" properties are not intended for a public use (that is why "_" is placed). If you would like to get the selected index use the select() method. If you would like to detect the old selected index in the change event then it will not be possible. You will need to cache the selected index and comparing it with the new one.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
DropDownList
Asked by
John
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or