This is a migrated thread and some comments may be shown as answers.

Remote CRUD Through DataSource using MVVM / ViewModel

3 Answers 213 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 05 Aug 2015, 04:24 AM
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

3 Answers, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 07 Aug 2015, 07:15 AM

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!
 
0
Richard
Top achievements
Rank 1
answered on 04 Sep 2017, 03:36 PM

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

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

0
Boyan Dimitrov
Telerik team
answered on 05 Sep 2017, 04:40 PM

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.
Tags
Data Source
Asked by
Richard
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Richard
Top achievements
Rank 1
Share this question
or