Remote CRUD Through DataSource using MVVM / ViewModel

2 posts, 0 answers
  1. Richard
    Richard avatar
    2 posts
    Member since:
    Jan 2014

    Posted 04 Aug 2015 Link to this post

    Imagine a model as:

        Id: { type: "number" },
        Name: { type: "string" },
        Nested: [
                Id: { type: "number" },
                Name: { type: "string" }

    So, the corresponding html form reflects this model.

    What I am having more trouble finding than I think I should is an example that combines the following:

    • A demo / sample of the datasource implementing full CRUD operations to a remote server API manipulating a semi-complex model like the one above, preferably also integrating MVVM.

    I have struggled far too much trying to work out how to combine a model, datasource, viewmodel, etc. into a cohesive whole that actually works.

    Very frustrating as the value add for Kendo UI is clear - but not if it take a week to learn how to use one component of the framework.

    Is there an example / demo covering this functionality that I may have missed? It seems like such a simple thing, I find it hard to believe there isn't one - but I really can't find it...

     To be clear, I am NOT looking for a Grid sample, nor dropdown lists, etc. but a normal HTML form with text inputs, etc.


  2. Boyan Dimitrov
    Boyan Dimitrov avatar
    1728 posts

    Posted 07 Aug 2015 Link to this post

    Hello Richard,

    Based on the provided information I would suggest reviewing our  MVVM / Source and template binding demo. It implements CRUD operations for adding/removing a product using a simple form. 

    The demo works with simple collection of items, but there is no problem to use a Kendo UI DataSource instead. In the Kendo UI DataSource CRUD Operations article it is demonstrated how to implement CRUD operations using the Kendo UI DataSource either with local or remote data. 

    Please note that there is no way to define such complex object in the schema.model of the Kendo UI DataSource, since it is designed to work only with flat data.

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