Reputation: 815
I want create Kendo Dropdown dynamically using Jquery. I need to created everything in Jquery. I've used below code, but it is creating only input textbox, but not converting into DDl.
var kendoddl = $("<input id=color value=1 />");
$("#color").kendoDropDownList({
dataTextField: action.Name,
dataValueField: action.Name,
dataSource: action,
index: 0
});
$("#addconfigurations").append(kendoddl);
Upvotes: 2
Views: 4135
Reputation: 4652
Reorder your code. First add append and then add call kendoDropDownList
var kendoddl = $("<input id=color value=1 />");
$("#addconfigurations").append(kendoddl);
$("#color").kendoDropDownList({
dataTextField: action.Name,
dataValueField: action.Name,
dataSource: action,
index: 0
});
Upvotes: 3