i am not able to populating data in KENDO dropdown where data is coming form database. here is my code for KENDO DROPDOWN:
function positionDropDownEditor(container, options) {
$('<input name="Size" required data-bind="value:' + options.field + '"/>')
.appendTo(container)
.kendoDropDownList({
autoBind: false,
dataTextField: "Name",
dataValueField: "Id",
dataSource: {
transport: {
read: {
dataType: "json",
url: "/Employee/AllPosition",
}
}
}
});
}
And the controller from where data is coming from:
public JsonResult AllPosition()
{
EmployeeService employeeService = new EmployeeService();
List<Position> positions= employeeService.GetAllPosition();
return Json(positions);
}
whats wrong here that data are not populating inside the dropdown? plz explain including "container, options" and what value they contain and why we need to use?
Thank you