I have a problem with a dataSource for a kendo grid. The dataSource consumes JSON endpoints for CRUD operations on a remote DB.
The JSON endpoints that the dataSource is consuming contain different root elements for read versus the other methods. The root element for a read is "GetFooResult.RootResults". The root element for all other methods is "SubmitChangesResult". The endpoints are created by the .NET DomainServices JSON endpoint factory, so I don't necessarily have influence over what format they return.
The problem is that the dataSource is not able to parse the returned JSON for methods except read, since that is what the dataSource:schema:data element is based on. Therefore when I execute a create operation it does not recognize the returned JSON; each subsequent create continues to attempt to send all previous create attempts, which creates duplicate records in the DB.
Any idea how to specify different dataSource:schema:data elements for the various transport methods? There seems to be only one schema with one data element per datasource. Could I write code under parameterMap that sets this element depending on the transport method?
Thanks,
David
The JSON endpoints that the dataSource is consuming contain different root elements for read versus the other methods. The root element for a read is "GetFooResult.RootResults". The root element for all other methods is "SubmitChangesResult". The endpoints are created by the .NET DomainServices JSON endpoint factory, so I don't necessarily have influence over what format they return.
The problem is that the dataSource is not able to parse the returned JSON for methods except read, since that is what the dataSource:schema:data element is based on. Therefore when I execute a create operation it does not recognize the returned JSON; each subsequent create continues to attempt to send all previous create attempts, which creates duplicate records in the DB.
Any idea how to specify different dataSource:schema:data elements for the various transport methods? There seems to be only one schema with one data element per datasource. Could I write code under parameterMap that sets this element depending on the transport method?
Thanks,
David