title: Kendo UI grid update
body: <p>I'm using a Kendo UI grid with a service that requires the POST request for updating a row to be a JSON string instead of an URL encoded form.</p>
  
  <p>My grid dataSource configuration looks like this:</p>
  
  <pre><code>dataSource: new kendo.data.DataSource({
      transport: {
          read: "/Service.svc/instructors",
          update: {
              url: "/Service.svc/instructors",
              type: "POST",
              contentType: "application/json; charset=utf-8",
              data: function (data) {
                  return kendo.stringify(data);
              }
          }
      },
      //...
  });
  </code></pre>
  
  <p>However the body of request ends up looking like this:</p>
  
  <pre><code>0=%7B&amp;1=%22&amp;2=I&amp;3=d&amp;4=%22&amp;5=:&amp;6=%20&amp;7=1&amp;8=,&amp;9=%20&amp;10=%22&amp;11=F&amp;12=o&amp;13=o&amp;14=%22&amp;15=:&amp;16=%20&amp;17=%22&amp;18=f&amp;19=o&amp;20=o&amp;21=%22&amp;22=,&amp;23=%20&amp;24=%22&amp;25=B&amp;26=a&amp;27=r&amp;28=%22&amp;29=:&amp;30=%20&amp;31=%22&amp;32=b&amp;33=a&amp;34=r&amp;35=%22&amp;36=%7D&amp;Id=1&amp;Foo=foo&amp;Bar=bar
  </code></pre>
  
  <p>An encoded json object (<code>{"Id": 1, "Foo": "foo", "Bar": "bar"}</code>) (what encoding is it, btw?) plus the form data.</p>
  
  <p>Doing it directly with jQuery works just fine:</p>
  
  <pre><code>$.ajax({
      type: "POST", 
      url: "/Service.svc/instructors", 
      data: kendo.stringify({Id: 1, Foo: "foo", Bar: "bar"}),
      contentType:"application/json; charset=utf-8",
      dataType: "json",
      success: function(data) { console.log(data);}
  });
  </code></pre>
  
  <p>According to the <a href="http://docs.telerik.com/kendo-ui/api/framework/datasource#configuration-transport.update" rel="nofollow">documentation</a>, I should be able to set update as a function and call that, but apparently this <a href="http://www.telerik.com/forums/grid-custom-transport-update-function-not-firing" rel="nofollow">hasn't work since 2012</a>.</p>
  
  <p>How can I make Kendo post the correct data?</p>