更新时间:2022-05-30 02:48:04
也许您的JSON对于DropDownList而言不是最方便,但您可以将其绑定到KendoDropDownList而无需更改.
Maybe your JSON is not the most convenient for a DropDownList but you can bind it to a KendoDropDownList with no change.
将DropDownList定义为:
Define the DropDownList as:
$("#dropdown").kendoDropDownList({
dataSource : dataSourceTowns,
dataTextField : "attributes.TNONAM"
});
请记住,dataTextField
不一定非要是一个字段,可以是该字段的路径.
Remember that dataTextField
doesn't strictly have to be a field, might be path to the field.
HTML所在的位置:
Where your HTML is:
<select id="dropdown"></select>