Making Kendo UI Grid, Odata V4 and Cors work together.

Its a little job to get it all to work.

CORS (cross domain request), see this blog: http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api

If Cors not setup correctly then FF/Chrome is not able to update/patch over cross domain correctly. IE works, see: http://www.telerik.com/forums/unable-to-update-grid-via-odata-v4

On Kendo UI Grids datasource set Type:”odata-v4) and transport/update/url to return ‘baseurl + data.models[0].ID’ and type to “PATCH”, dataType to “json”.

ParmameterMap on on read operation set paramMap.$count = true and delete paramMap.$format and delete paramMap.$inlinecount, on create and update operation return kendo.stringify(data.models[0].

On schema set data to return data[‘value’] and total to return Number(data[“@odata.count”]) and model that include an id and fields.