Remote CRUD Through DataSource using MVVM / ViewModel

4 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.

    Richard

  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1968 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.

    Regards,
    Boyan Dimitrov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. RichardAD
    RichardAD avatar
    138 posts
    Member since:
    Feb 2012

    Posted 04 Sep in reply to Boyan Dimitrov Link to this post

    The link to "MVVM / Source and template binding demo" is broken.  The correct link is

    http://demos.telerik.com/kendo-ui/mvvm/source

  4. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1968 posts

    Posted 05 Sep Link to this post

    Hello,

     

    Thank you. 

     

    Indeed the correct link for the demo is http://demos.telerik.com/kendo-ui/mvvm/source. 

     

    Regards,
    Boyan Dimitrov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top