This question is locked. New answers and comments are not allowed.
Good morning I have the following dropdownlist that I'm trying to fill, but it is not working.
kendo.bind($('#kdlResponsibleOffice'), vmOffices); gets undefined and I believe this is why the following code also fails.
$('#kdlResponsibleOffice').data('kendoDropDownList').bind('change', function () {
updateSysInfoStringField(sie.sysInfoId, "ResponsibleOffice", this.value());
});
Any feedback is really appreciated.
Thank you,
Rocio
populateOffice = function () { var sie = this; $.ajax({ url: "Service/InventorySvc.asmx/GetOffices", success: function (r) { var os = r.d; offices = []; $.each(os, function (i, o) { var office = { FullName: o.OfficeName + ' - ' + o.OfficeFullName, ShortName: o.OfficeName }; offices.push(office); }); vmOffices = kendo.observable({offices: offices, responsibleOffice: sie.sysInfo.ResponsibleOffice}); kendo.bind($('#kdlResponsibleOffice'), vmOffices); $('#kdlResponsibleOffice').data('kendoDropDownList').bind('change', function () { updateSysInfoStringField(sie.sysInfoId, "ResponsibleOffice", this.value()); }); } });
<tr> <td>Responsible Office: </td> <td><input id="kdlResponsibleOffice" data-role="dropdownlist" data-text-field="FullName" data-value-field="ShortName" data-bind="source:offices, value: responsibleOffice" style="width:550px" /></td></tr>