Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
165
ig.RemoteDataSource : responseDataKey
posted

Hello,
I try to use ig.RemoteDataSource and property responseDataKey (response in JSON) in IgniteUi 15.2.
In many examples in the documentation, the property is used with the values "d" or "d.results". I can not use anything in replacement of "d".
example:
d.rows: OK
d.test: OK
data.rows: NOK
Apparently this does not work when the root property is not "d".
Thanks for your help

Parents Reply
  • 9190
    Offline posted in reply to GBAU

    Hi GBAU,

    Taking the following "Remote Data" sample as an example:
    https://www.igniteui.com/sparkline/bind-to-remote-data

    Here, we are also setting the responseDataKey to 'd.results'. If you review the json sent to the client, you will see that the results are enclosed in the "d" object. This is due to the default configuration of the OData service we use to send the json data to the client, as we've learned in the help topic I referenced in my last update. Note, this syntax is set through the service and not the RemoteDataSource or ODataRemoteDataSource on the client. If you wish to alter the way the json is constructed, you will have to make the changes within your service which is outside of the IgniteUI components.

    I have attached a screenshot which helps demonstrates what I was referencing in the sample. Please let me know if you have additional questions regarding this matter.

    Screenshot.zip
Children