I have configured a Kendo ComboBox as follows:
var junk = $("#junk").kendoComboBox({
dataTextField: "Code",
dataValueField: "Id",
dataSource: {
type: "json",
//serverFiltering: true,
transport: {
read: {
url: "myServlet?action=ReadJunk",
contentType: "application/json;charset=utf-8",
dataType: "json"
}
},
schema: {
model: {
id: "Id",
fields: {
Id: {
type: "integer"
},
Code: {
type: "string"
},
shortDescription: {
type: "string"
}
}
}
}
},
change: function(e){
// in here I want to set the ShortDesc widget's content to the selected shortDescription
$("#ShortDesc").value = "shortDescription"; // this doesn't work
}
}).data("kendoComboBox");
The values ID, Code, and shortDescription are properly being returned by my Java Servlet. In the change event I would like set the value of another control to the value of shortDescription that is associated with the selected ComboBox item. What is the proper format for accessing this value?
Thanks
Steven
var junk = $("#junk").kendoComboBox({
dataTextField: "Code",
dataValueField: "Id",
dataSource: {
type: "json",
//serverFiltering: true,
transport: {
read: {
url: "myServlet?action=ReadJunk",
contentType: "application/json;charset=utf-8",
dataType: "json"
}
},
schema: {
model: {
id: "Id",
fields: {
Id: {
type: "integer"
},
Code: {
type: "string"
},
shortDescription: {
type: "string"
}
}
}
}
},
change: function(e){
// in here I want to set the ShortDesc widget's content to the selected shortDescription
$("#ShortDesc").value = "shortDescription"; // this doesn't work
}
}).data("kendoComboBox");
The values ID, Code, and shortDescription are properly being returned by my Java Servlet. In the change event I would like set the value of another control to the value of shortDescription that is associated with the selected ComboBox item. What is the proper format for accessing this value?
Thanks
Steven