Aspnet Mvc/Helpers/Grid/Ajax-editing

3 posts, 0 answers
  1. Gusev
    Gusev avatar
    83 posts
    Member since:
    Dec 2012

    Posted 15 Mar 2013 Link to this post

    Hello!
    I have one questons!

    I use help from 
    http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/helpers/listview/editing

    and why if I use "public ActionResult Editing_Create"
     I need return 
    return Json(new [] { product }.ToDataSourceResult(request, ModelState));
    but if I use public ActionResult Editing_Update
    I need return 
    return Json(ModelState.ToDataSourceResult());

    In my project,when I use 
    return Json(ModelState.ToDataSourceResult());
    for my Update Method...I get "ModelState.ToDataSourceResult = null", and if I use first example, I get what I need

    Please help!
    Give me please some explanation
    And sorry for my bad English
  2. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2289 posts

    Posted 18 Mar 2013 Link to this post

    Hello Gusev,

     
    When you create new items they must be returned back to client in order be accepted from the DataSource. This however is not required when you update items.

    The ModelState in both cases must be returned as this is one of the indicators whether the server operations has succeeded or failed.

    Regards,
    Nikolay Rusev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Ernesto
    Ernesto avatar
    2 posts
    Member since:
    Sep 2012

    Posted 11 Apr 2013 Link to this post

    Hellow Gusev,

    I have been also struggling with this and I just found this links that might be useful to you (and all of us).

    - http://www.kendoui.com/forums/mvc/grid/edit-problems-with-2013-1-319.aspx
    - http://www.kendoui.com/forums/mvc/general-discussions/update-destroy-operations-trigger-the-error-event-of-the-datasource-after-updating-to-q1-2013-(v-2013-1-319).aspx
Back to Top