javascript - Kendo UI Web - DropDownList: Select event doesn't return selected value properly -


i binding dropdownlist widget select event so:

var items = [     { text: 'item 3', value: '3' },     { text: 'item 4', value: '4' } ];  var dropdownlistel = $('#dropdownlist'); dropdownlistel.kendodropdownlist({     datatextfield: 'text',     datavaluefield: 'value',     index: 0 });  var kdropdownlist = dropdownlistel.data('kendodropdownlist'),     ds = kdropdownlist.datasource;  items.foreach(function (item) {     ds.add(item); });  kdropdownlist.bind('select', function (e) {     console.log('this.value(): ' + this.value()); }); 

but, doesn't return correct value when selection.

i have been trying every possibility there is, none working. http://jsfiddle.net/glenn/gxj3s/

it's driving me insane!

binding select event of kendo dropdownlist follow correct selected item

   kdropdownlist.bind('select', function (e) {        var dataitem = this.dataitem(e.item.index());         console.log('this.value(): ' + dataitem.value);     }); 

here working jsfiddle


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -