Please try with the below code snippet.
<script type="text/javascript">
function getSlectedItem() {
var ddl = $("#color").data("kendoDropDownList");
alert(ddl.dataSource.data()[ddl.selectedIndex - 1].type);
}
function onSelect(e) {
alert(e.sender.dataSource.data()[e.item.index() - 1].type);
}
$(document).ready(function () {
var data = [
{ text: "Black", value: "1", type: "string" },
{ text: "Orange", value: "2", type: "int" },
{ text: "Grey", value: "3", type: "string" }
];
$("#color").kendoDropDownList({
dataTextField: "text",
dataValueField: "value",
dataSource: data,
optionLabel: "select",
select: onSelect
});
});
</script>
- On selection you will get the type field of this item
- On button click you will also get the type field of this item
Let me know if any concern.