I have created a datasource (verified the results retrieved) then I try to use it when initializing a dropdownlist. The dropdown list is rendered but not populated with any data. Also how do I refresh the dropdown after the datasource results have changed? I realize that I can't reinitialize the original element multiple times. Thanks!
Sample Code:
var myDataSource = new kendo.data.DataSource({
transport: {
read: {
url: '@Url.Action("Method", "Entity", new { Area = "Area" })',
dataType: "json",
contentType: "application/json; charset=utf-8",
data: { param1: param }
}
},
change: function (event) {
$("#INPUT").kendoDropDownList({
dataTextField: "Text",
dataValueField: "Value",
dataSource:
{
data: myDataSource
}
}
});
Sample Code:
var myDataSource = new kendo.data.DataSource({
transport: {
read: {
url: '@Url.Action("Method", "Entity", new { Area = "Area" })',
dataType: "json",
contentType: "application/json; charset=utf-8",
data: { param1: param }
}
},
change: function (event) {
$("#INPUT").kendoDropDownList({
dataTextField: "Text",
dataValueField: "Value",
dataSource:
{
data: myDataSource
}
}
});