Here's what I ended up with. It appears that the drop down list's items are not yet repopulated when the dataBound event fires, but the dataSource's data is, so I was able to use that. Still seems a bit hacky though.
function
loadCodeDropdownList() {
var
codeList = $(
"#CodeDropDown"
).data(
"kendoDropDownList"
);
var
oldVal = codeList.value();
if
(oldVal !=
null
&& oldVal !=
""
) {
codeList.one(
"dataBound"
,
function
(e) {
var
data = codeList.dataSource.data();
var
newVal =
""
;
for
(
var
k = 0; k < data.length; k++) {
if
(oldVal == data[k].Code) {
newVal = oldVal;
break
;
}
}
codeList.value(newVal);
if
(newVal ==
""
) {
codeList.trigger(
"change"
);
}
});
}
codeList.dataSource.read(CodeDropDownData());
}