Ajax Binding return 'undefined' results in list

4 posts, 1 answers
  1. Jeff
    Jeff avatar
    5 posts
    Member since:
    Aug 2011

    Posted 06 Dec 2012 Link to this post


    I'm not able to get Ajax binding to work with my combobox.  I went the Kendo Ajax binding example to the letter.  The combox box returns 'undefined' in the results.  I verified that the controller method is called.

    public JsonResult GetContainers()
                List<Container> containers = new List<Container>();
                containers.Add(new Container() { ContainerId = 1, ContainerName = "Container1" });
                containers.Add(new Container() { ContainerId = 2, ContainerName = "Container2" });
                return Json(containers);
                .DataSource(dataSource =>
                    dataSource.Read(read =>
                            read.Action("GetContainers", "Common");
  2. Answer
    Georgi Krustev
    Georgi Krustev avatar
    3687 posts

    Posted 07 Dec 2012 Link to this post

    Hello Jeff,

    The only thing I can spot in the code snippet is the missing second parameter in the Json method. By default the DataSource makes GET requests to the server and you will need to allow these requests:

    return Json(containers, JsonRequestBehavior.AllowGet);
    If the problem still persist I will need a repro test project.

    Georgi Krustev
    the Telerik team
    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
  4. Karl
    Karl avatar
    1 posts
    Member since:
    Feb 2014

    Posted 26 Feb 2014 in reply to Jeff Link to this post

    I had the same problem.  If you look at the json being returned you'll see it returns Text and Value not your property names.  I can't figure out why though.
  5. Mark
    Mark avatar
    79 posts
    Member since:
    Apr 2007

    Posted 09 Jun in reply to Karl Link to this post

    This post and Karl's answer helped me a LOT today.  Thanks!
Back to Top
UI for ASP.NET AJAX banner