Grid with incell editing does not support schema 'from' option

4 posts, 0 answers
  1. Rowan
    Rowan avatar
    21 posts
    Member since:
    Jul 2014

    Posted 26 Apr 2016 Link to this post


    We have a grid that maps nested model properties. We have used the schema 'from' option exactly as outlined here:

    However this does not work properly if the grid is configured with incell editing. Instead of editing the variable at its original location (as specified by the 'from' option), the grid just creates new dummy variables on the target object with the same name as the schema field. Any edits are then stored into those dummy fields rather than to the original location.

    Here is a dojo example that reproduces the issue:

    If you open the console there is a timer that logs the toJSON() content of the object in the grid. You can see the dummy variables that get created, and whenever you make edits to the object the dummy variables update, but the original nested ones don't.



  2. Rosen
    Rosen avatar
    3253 posts

    Posted 28 Apr 2016 Link to this post

    Hello Rowan,

    Indeed, this is exactly how it is designed to work. The from settings uses the initial data's field value to populate a new field with the specified name, than if this object is synced, the shape of the object send to the server will be same as the original one. Thus, when using the object locally it will have the fields defined in the schema.field.from as this is how the local object is defined (via the schema.model) to look.

    Here you can find a test page which demonstrate that the object received and send from/to the server has same shape.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. rwyborn
    rwyborn avatar
    1 posts
    Member since:
    Aug 2014

    Posted 28 Apr 2016 in reply to Rosen Link to this post

    Hi Rosen,

    The problem in our case is that we are binding to a local data source rather than a remote one. So in this case we expect the data as returned by a call to be in the correct format. But that does not appear to be the case when using 'from'.

    Is there a way to make 'from' work with a local data source?



  4. Alex Gyoshev
    Alex Gyoshev avatar
    2527 posts

    Posted 02 May 2016 Link to this post

    Hello rwyborn,

    I am afraid that this is not supported -- see this thread on how to edit local data.

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