I have a javascript function upon the selection of the ddl item I see it calls the this.value() function in which I can see only the id. I’m trying to retrieve the other properties of the selected item
Below is the current code, which retrieves only the id , I did tried to fetch the other properties it didn’t worked
function updateBilling(data) {
$("#srchAcntList").kendoDropDownList({
dataSource: data,
dataTextField: "Text",
dataValueField: "Value",
template: " #=data.Text#",
optionLabel: {
Text: "Select...",
Value: 0
},
change: function (e) {
var value = this.value();
if (value != "") {
showAcntNumber(value);
}
}
});
}
function showAcntNumber(acnt) {
var AcntNumber = '';
if (acntInfo.length > 0) {
billingAcntNumber = acntInfo;
document.getElementById("lblAcntNo3").innerText = billingAcntNumber;
}
}
I tried to add below code to fetch EdcAcntNum of selected item , in this case it should bring 55078 EdcAcnt Num
var acntNumber = this.data["EdcAcntNumber"];
console.log(acntNumber);
It didn’t worked
Upon change function I can see
I can see the code
var value = this.value();
retrieves only the Value:55078 but I wanted to get EdcAcntNum object value, kindly see the attach image too for reference