Drop down list is continously showing the loading sign
I have the following model deliverable type
public partial class t_deliverable_type_mst
{
public t_deliverable_type_mst()
{
this.t_deliverable_item_mst = new HashSet<t_deliverable_item_mst>();
}
public int pk_d_type_id { get; set; }
public string type { get; set; }
public string logo { get; set; }
public virtual ICollection<t_deliverable_item_mst> t_deliverable_item_mst { get; set; }
}
I have create a kendo drop downlist as
@(Html.Kendo().DropDownList()
.Name("dtype")
.HtmlAttributes(new { style = "width: 200px" })
.OptionLabel("Not working")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetTypes", "deliverable");
})
.ServerFiltering(true);
})
.DataTextField("type")
.DataValueField("pk_d_type_id")
.SelectedIndex(0)
.Template("<img src=\"" + Url.Content("~/images/dtype_logo/") + "${data.logo}\" alt=\"${data.type}\" />" +
"<dl>" +
"<dt>Type:</dt><dd>${data.type}</dd>" +
"</dl>")
)
this is the method in my controller
public JsonResult GetTypes()
{
deliverableEntities deliv_ent = new deliverableEntities();
JsonResult types = new JsonResult();
var type_list = deliv_ent.t_deliverable_type_mst.ToList();
types= Json(type_list, JsonRequestBehavior.AllowGet);
return types;
}
I have the following model deliverable type
public partial class t_deliverable_type_mst
{
public t_deliverable_type_mst()
{
this.t_deliverable_item_mst = new HashSet<t_deliverable_item_mst>();
}
public int pk_d_type_id { get; set; }
public string type { get; set; }
public string logo { get; set; }
public virtual ICollection<t_deliverable_item_mst> t_deliverable_item_mst { get; set; }
}
I have create a kendo drop downlist as
@(Html.Kendo().DropDownList()
.Name("dtype")
.HtmlAttributes(new { style = "width: 200px" })
.OptionLabel("Not working")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetTypes", "deliverable");
})
.ServerFiltering(true);
})
.DataTextField("type")
.DataValueField("pk_d_type_id")
.SelectedIndex(0)
.Template("<img src=\"" + Url.Content("~/images/dtype_logo/") + "${data.logo}\" alt=\"${data.type}\" />" +
"<dl>" +
"<dt>Type:</dt><dd>${data.type}</dd>" +
"</dl>")
)
this is the method in my controller
public JsonResult GetTypes()
{
deliverableEntities deliv_ent = new deliverableEntities();
JsonResult types = new JsonResult();
var type_list = deliv_ent.t_deliverable_type_mst.ToList();
types= Json(type_list, JsonRequestBehavior.AllowGet);
return types;
}