0

I need additional information associated to the selected item. how do I access to the additional fields at change event

var language = [
        {value: "English",  culture: "en-US", direction: "ltr", text: "English"},
        {value: "עברית",    culture: "he-IL", direction: "rtl", text: "עברית - Hebrew"},
        {value: "Français", culture: "fr-FR", direction: "ltr", text: "Français - French"}
    ];

$('#input').kendoDropDownList({
    'dataTextField': 'text',
    'dataValueField': 'value',
    'dataSource': language,
    'index': 0,
    'change': function (e) {
        // how do I access here to 'culture' and 'direction' fields
    }
});
4

1 回答 1

0

您可以使用dataItem小部件的方法来检索所选项目的数据:

'change': function (e) {
    var item = this.dataItem();
    // item.culture and item.direction
}
于 2013-12-26T11:28:12.007 回答