【问题标题】:value not populating to kendo dropdown值未填充到剑道下拉列表中
【发布时间】:2013-06-12 05:27:43
【问题描述】:

我有一个带有 Kendo UI 的 MVC 视图,它绑定了 ListObject 的值。当从 xml 文件中获取数据时,Kendo Dropdown 会绑定值,但数据是从数据库的表中获取的,它不会将值绑定到下拉列表。但是有值并返回到 Dropdown 的绑定函数的 List 是有值的。

值以 Json 格式绑定。

//Controller Code that returns value to Kendo Dropdown in View

public JsonResult BindTitles()
{
return Json(_title.GetTitle(), JsonRequestBehavior.AllowGet);
}

//Data Interface from Entity Framework

public partial interface ITitle
{
IList<tblTitle> GetTitle();
}

public IList<tblTitle> GetTitle()
{
List<tblTitle> tit = new List<tblTitle>();
tit = dbContext.GetTitle().ToList(); // Here the values are available in the "tit"

return tit;
}

【问题讨论】:

    标签: asp.net-mvc-4 kendo-ui ilist kendo-combobox


    【解决方案1】:

    显示您配置剑道下拉菜单的视图代码。控制器代码不足以给你解决方案。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-11-24
      • 2022-01-19
      • 1970-01-01
      • 1970-01-01
      • 2020-06-11
      • 2014-10-14
      • 1970-01-01
      相关资源
      最近更新 更多