Drop down list doesn't load from json result

2 posts, 0 answers
  1. Pritam
    Pritam avatar
    16 posts
    Member since:
    Jan 2013

    Posted 29 May 2013 Link to this post

    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
                  .HtmlAttributes(new { style = "width: 200px" })
                  .OptionLabel("Not working")
                  .DataSource(source =>
                      source.Read(read =>
                          read.Action("GetTypes", "deliverable");
                 .Template("<img src=\"" + Url.Content("~/images/dtype_logo/") + "${data.logo}\" alt=\"${data.type}\" />" +
                             "<dl>" +
                              "<dt>Type:</dt><dd>${data.type}</dd>" +

    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;

  2. Petur Subev
    Petur Subev avatar
    1882 posts

    Posted 31 May 2013 Link to this post

    Hello Pritam,

    Usually when there is an error (you need to check the console for errors) the spinning of the DropDownList never ends, could you share details about the error?

    If there is no error we need a sample project to run or live URL to browse ,so we can see what the problem is.

    Rest of the code look properly configured.

    Kind Regards,
    Petur Subev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET AJAX banner
Back to Top