Datasource / Datagrid issue on POST success

2 posts, 0 answers
  1. cra
    cra avatar
    16 posts
    Member since:
    Jun 2012

    Posted 08 Jan 2016 Link to this post

    Hello all,


    I have a Grid that is bound to a DataSource. The schema for the data source is such that there is an embeded (related / expanded) objecting being returned by the API. Everything works fine for the read and update methods. However when the create method is called, the response from the POST method in the API only returns the resource that was created (not the expanded / related data). So when the grid attempts to rebind to the response object it fails because it does not exist in the POST response.


    Should we simply force our API to provide the expanded object in the response? This seems like a violation to the RESTful paradigm perhaps? 


    How are others handling this scenario?



  2. Dimo
    Dimo avatar
    8404 posts

    Posted 13 Jan 2016 Link to this post

    Hello Christopher,

    We will need more information on what these additional objects are in order to provide an up-to-the-point opinion in this case.

    In case the additional objects represent foreign keys or nested fields, then they should have default values defined in the model. See the following demos for similar scenarios.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top