日期:2014-05-16  浏览次数:20898 次

easyui-combobox select
这是前台代码:
<input id="ddlDistrict" class="easyui-combobox" style="width: 76px" data-options="url: getRootPath() + '/ServerDictionaryService.svc/GetWardTypeListList',valueField:'DistrictNo',textField:'CName',panelHeight:'auto' 
" />
 
----------------------------------
这是 url 调用wcf 
public BaseResultList<District> GetWardTypeListList(string where)
{
BaseResultList<Model.District> DistrictListList = new BaseResultList<District>();
try
{
Model.District model = new District();
DataSet ds = IBDistrictBLL.GetAllList();
if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
{
DistrictListList.rows = IBDistrictBLL.DataTableToList(ds.Tables[0]);
DistrictListList.total = IBDistrictBLL.GetTotalCount(model);
}
DistrictListList.success = true;
DistrictListList.msg = "成功";
}
catch (Exception ex)
{
DistrictListList.success = false;
DistrictListList.msg = ex.Message;
}
return DistrictListList;
//throw new NotImplementedException();
}
 
返回的json:
 

 
为什么select标签绑定的信息不能显示出来
------解决方案--------------------
BaseResultList<T> 改为List<Model.District>