问题描述
想通过Web服务从数据库将值列表绑定到kendoCombobox.
这是代码
want to bind list of values to kendoCombobox from dataBase through webservices.
Here is the code
<select id = "CbxArea" style="width:200px">
</select>
$(document).ready(function ()
$("#CbxArea").kendoComboBox();
var cmbArea = $("#CbxArea");
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "FlashReportWebService.asmx/GetAreaNames",
dataType: "json",
success: function (data) {
for (i = 0; i < data.d.length; i++) {
cmbArea.append($("<option></option>").val(data.d[i].AreaName).html(data.d[i].AreaName));
}
}
});
值列表已成功传入,但问题是组合框中仅显示第一个值,未显示剩余值(我在列表中有16个值)
如果我写$("#CbxArea");
而不是$("#CbxArea").kendoComboBox();
,则comboBox中将显示总共16个值.
kendocombobox中从.asmx页面绑定值是否存在任何问题.
我只能在kendoComboBox中显示值.
请帮忙.
谢谢,
parsanamoni.
List of values are coming successfully, but the problem is only 1st value is showing in combobox, remaining values are not displaying (i have 16 values in list)
if i write $("#CbxArea");
instead of $("#CbxArea").kendoComboBox();
total 16 values are displaying in comboBox.
Is there any problem in kendocombobox for binding values from .asmx page.
I must display values in kendoComboBox only.
Please help.
thanks,
parsanamoni.
推荐答案
这篇关于kendoComboBox中未显示所有列表值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!