title: Passing KENDO Grid data view to MVC controller
body: <p>I have an issue sending Telerik Kendo Grid viewdata to MVC Controller. I've tried to make ViewModel etc but i just can't figure this one out.</p>
  
  <p>Here is my code to populate grid:</p>
  
  <pre><code> var grid = $("#grid").kendoGrid({
                              dataSource: {
                                  data: kontdata.Data,
                                  schema: {
                                      model: {
                                          fields: {
                                              Id: { type: "number", editable: false },
                                              Name: { type: "string" },
                                              Number: { type: "string" },
                                              Info: { type: "string" },
                                              Email: { type: "string" },
                                              Category: { type: "string" },
                                              MarketingAllowed: { type: "number", editable: false },
                                              AddedDate: { type: "date", editable: false }
                                          }
                                      }
                                  },
                                  pageSize: 20
                              },
                              height: 500,
                              scrollable: true,
                              toolbar: kendo.template($("#template").html()),
                              serveroperation: false,
                              sortable: true,
                              editable: { mode: "incell", confirmation: false },
                              selectable: "row",
                              filterable: true,
                              pageable: true,
                              columns: [
                                  {
                                      field: "Name",
                                      title: "Nimi"
                                  },
                                  {
                                      field: "Number",
                                      title: "Numero"
                                  },
                                  {
                                      field: "Info",
                                      title: "Info"
                                  },
                                  {
                                      field: "Email",
                                      title: "Email"
                                  },
                                  {
                                      field: "Category",
                                      title: "Kategoria"
                                  },
                                  {
                                      field: "MarketingAllowed",
                                      title: "Markkinointikielto",
                                      width: "160px"
                                  },
                                  {
                                      field: "AddedDate",
                                      title: "LisättyPvm",
                                      format: "{0:dd/MM/yyyy HH:mm:ss}"
                                  },
                                  {
                                      command: [
                                          { name: "destroy", text: "Poista", width: "70px" }
                                      ]
                                  }
                              ]
                          }).data("kendoGrid");
  </code></pre>
  
  <p>And here is the code to post grid view data:</p>
  
  <pre><code>function tallennagridi() {
          var griddata = $("#grid").data("kendoGrid");
  
          $.ajax(
                 {
                     type: 'POST',
                     url: '/Contactlist/Savegriditems/',
                     dataType: 'json',
                     contentType: "application/json; charset=utf-8",
                     data: JSON.stringify({ griditems: griddata.dataSource.view() }),
                     success: function (result) {
                         alert('success');
                     }
                 });
      };
  </code></pre>
  
  <p>And here is the controller:</p>
  
  <pre><code>public JsonResult Savegriditems([DataSourceRequest] DataSourceRequest request, CustomerViewModel griditems)
      {
          var joku = griditems;
  
          return Json(joku, "Content-type: text/x-json; charset=utf-8", JsonRequestBehavior.AllowGet);
      }
  </code></pre>
  
  <p>Any help would be appreciated.</p>
  
  <p>Br. Eero</p>