title: Kendoui grid, datasource and restful service
body: <p><strong>Q1</strong>: I'm trying to get the kendoui grid bound to a datasource talking to a restful service, (using servicestack).  All is working ok except when I call PUT and the rest service sends back the persisted poco object I get a strange javascript error and you do not get to the success method of the datasource.</p>
  
  <p>Error is</p>
  
  <pre><code>Uncaught SyntaxError: Unexpected number kendo.all.min.js:9
  extend.setter kendo.all.min.js:9
  o.extend._set kendo.all.min.js:9
  T.extend.accept kendo.all.min.js:9
  o.extend._accept kendo.all.min.js:9
  (anonymous function) kendo.all.min.js:9
  n jquery.min.js:2
  o.fireWith jquery.min.js:2
  o.fire jquery.min.js:2
  g.(anonymous function).call.c.success kendo.all.min.js:9
  n jquery.min.js:2
  o.fireWith jquery.min.js:2
  w jquery.min.js:4
  d
  </code></pre>
  
  <p>The datasource/grid configuration looks like</p>
  
  <pre class="lang-js prettyprint-override"><code>$(document).ready(function () {
      var crudServiceBaseUrl = "/api/configuration/databaseconnections";
      $("#grid").kendoGrid({
      dataSource: {
          type: "json",
          transport: {
          read: {
              url: crudServiceBaseUrl,
              dataType: "json"
          },
          update: {
              url: function (db) {
              console.log(db);
              return crudServiceBaseUrl + "/" + db.Id;
              },
              type: "PUT",
              success: function (result) {
              console.log(result);
              }
              //dataType: "json"
          },
          destroy: {
              url: function (db) {
              return crudServiceBaseUrl + "/" + db.Id;
              },
              type: "DELETE",
              //dataType: "json"
          },
          create: {
              url: function (db) {
              return crudServiceBaseUrl + "/" + db.Id;
              },
              type: "PUT",
              //dataType: "json"
          },
          },
  
  
  
  
          schema: {
          model: {
                  id: "Id",
              fields: {
              Id: { type: "string" },
              ConnectionString: { type: "string" },
              DatabaseType: { type: "string" },
              ProfileConnection: { type: "string" },
              }
          }
          },
          pageSize: 10,
          serverPaging: false,
          serverFiltering: false,
          serverSorting: false,
          model: {
          id: "Id",
          fields: {
              ConnectionString: { editable: true },
              DatabaseType: { editable: false, nullable: false, validation: { required: true } },
              ProfileConnection: { editable: false, nullable: false, validation: { required: true } },
          }
          }
  
      },
      height: 250,
      filterable: true,
      sortable: true,
      pageable: true,
      reorderable: true,
      resizable: true,
      toolbar: ["create"],
      columns: [{
          field: "Id",
          filterable: false,
          width: 150,
      },
          {
          field: "ConnectionString",
          title: "Connection String",
          filterable: false,
          }, {
          field: "DatabaseType",
          title: "Type",
          width: 100
          },
          {
          field: "ProfileConnection",
          title: "Profile",
          width: 100
          },
      { command: ["edit", "destroy"], title: "&amp;nbsp;", width: "210px" }
      ],
      editable: "popup"
      });
  });
  </code></pre>
  
  <p><strong>Q2</strong>: Anyone have an idea or a sample of the kendoui datasource working with a crud rest service ?</p>