New to Kendo UI for jQuery? Download free 30-day trial

Transform Invalid Data Item Keys into Valid Ones


Product Progress® Kendo UI® Grid for jQuery
Operating System All
Browser All
Browser Version All


How can I use the schema.parse() method to replace the non-supported data item keys with supported ones in the Kendo UI Grid for jQuery?


Sometimes the received remote data contains fields that are not valid JavaScript identifiers.

To manipulate the received data and transform it so that it can be processed by the DataSource, use the schema.parse() method to replace the non-supported keys with supported.

The following example demonstrates how to use the schema.parse() method to transform invalid data item keys into valid ones.

    <div id="grid"></div>
          $(document).ready(function () {
              var d = [{id: 1,
                  "As Of Date": new Date("01/01/1991")
              }, {id:2,
                  "As Of Date": new Date("01/01/1990")

                  editable: "popup",
                  dataSource: {
                      transport: {
                          read: function (e) {
                              // on success
                              // on failure
                              //e.error("XHR response", "status code", "error message");
                          update: function (e) {
                              // persist the new data
                              d =;

                      schema: {
                          parse: function (response) {
                              // transform the objects so that they do not contain "illegal" identifiers
                              response.forEach(function (item) {
                                  item.field1 = item["As Of Date"];
                                  delete item['As Of Date'];

                              return response;
                          model: {
                              fields: {
                                  "id": "id",
                                  "field1": {
                                      type: "date",
                  columns: [
                        command: [{ name: "edit" }]
                          { field: "field1", format: "{0:MM/dd/yyyy}", title: "As Of Date" }

See Also

In this article