We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Datamanager cannot be applied as datasource, Indexof error because of missing url

I have a problem for 2 days now, which I only noticed now, that its not about my backend of frontend, but the installed packages.

i cannot apply a datamanger as a datasource for a Grid. it keeps throwing an error that it cannot read the indexof of the datamanagers' datasources' url. even with an online sample that runs online fine, i cant get it to work.

this does not run in my application, throws the same error:

https://stackblitz.com/edit/react-befaby-dhqelb?file=sample-base.js,index.css


Error:

Uncaught TypeError: Cannot read properties of undefined (reading 'indexOf')

    at UrlAdaptor.processQuery (adaptors.js:625:35)

    at e.executeLocal (ej2-data.min.js:10:74366)

    at ej2-data.min.js:10:75536


3 Replies

PS Pavithra Subramaniyam Syncfusion Team April 11, 2023 06:42 AM UTC

Hi Mehdi Nabhani,


We have checked the shared sample which is working fine at our end. Please refer to the below screenshot.



From your query we suspect that some duplicate package might be installed in “@syncfusion” folder of node_modules while updating. This may occur due to version mismatch of packages. So, we suggest you delete the “@syncfusion” folder and “package.lock.json” file from your application and follow the steps provided in the below documentation for update the packages.


Documentation: https://ej2.syncfusion.com/react/documentation/common/how-to/update-npm-package


If you are still facing the issue, please share the below details which will be helpful for us to validate further.


  1. Share the Syncfusion package version.
  2. Full Grid code example with DataManager code in which the issue is occurred.
  3. Replication procedure of the issue.
  4. Share an issue reproducible sample if possible.


Regards,

Pavithra S



MN Mehdi Nabhani replied to Pavithra Subramaniyam April 20, 2023 04:37 PM UTC

Thank you, I found the problem and solved it with the help of the documentation you provided.



SS Swetha Srikumar Syncfusion Team April 21, 2023 10:51 AM UTC

We are glad to hear that your problem has been solved.


Loader.
Live Chat Icon For mobile
Up arrow icon