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

Update function problems

1 Answer 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 05 Oct 2012, 03:11 PM
Hi!
I try to use grid created by javascript. Transport for create is:
var transport = {
                create: {
                    url: "@Url.Action("Create", "Pledge")",
                    contentType: "application/json; charset=utf-8",
                    dataType: "jsonp"
                }
            };

For create method I use MVC4 Action something like this:
public ActionResult Create([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<MyModel> models). 

In models I have created elements. But all of this elements are empty. Can anyone help me with this issue?
Maybe I need to change type of transport create or something like this? 

1 Answer, 1 is accepted

Sort by
0
Alex
Top achievements
Rank 1
answered on 11 Oct 2012, 01:16 PM
Solution:
use dataSource type:"aspnetmvc-ajax",

 var dataSource = new kendo.data.DataSource({
           //some code
             type:"aspnetmvc-ajax",
           //some code
});

Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Answers by
Alex
Top achievements
Rank 1
Share this question
or