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

Proper way to post data to Web API using MVVM

1 Answer 111 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 09 Sep 2015, 06:42 PM

I've seen a few samples on fetching data from Web API for MVVM with Kendo UI, but I see almost NO examples on how to post data properly to ASP.NET Web API.  I saw an example where you guys said that you need to post an Array of items to Web API, but I'm not sure how old/accurate that is.  Do you have any samples of how I can take an Edit form and Post Data to ASP.NET Web API.  When I go to my Edit Page, I am using the Kendo.DataSource to retrieve the Model from the server, but I'm not sure how to post it back.(clientside JavaScript and what does the Web API expect from the client).

Thanks

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 11 Sep 2015, 01:08 PM

Hello Mark,

 

I'm afraid we do not have such example available. However, as you have the intend to use the DataSource in order to retrieve and post back data to the controller, you should be able to use similar to the DataSource configuration shown in this Grid sample. In order to sync the DataSource you should use its API similar to the way demonstrated in this online demo.

 

Regards,
Rosen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
MVVM
Asked by
Mark
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or