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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Angular Grid WebApiAdaptor error

Thread ID:





143373 Mar 17,2019 08:33 PM UTC Mar 18,2019 08:39 AM UTC Angular - EJ 2 1
Tags: Grid
Asked On March 17, 2019 08:33 PM UTC

I'm getting the following error using grid and asp.net core web api
ERROR TypeError: Cannot read property 'indexOf' of undefined
    at WebApiAdaptor.push../node_modules/@syncfusion/ej2-data/src/adaptors.js.UrlAdaptor.processQuery (adaptors.js:452)
    at DataManager.push../node_modules/@syncfusion/ej2-grids/node_modules/@syncfusion/ej2-data/src/manager.js.DataManager.executeLocal (manager.js:116)
    at manager.js:164
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
    at Object.onInvokeTask (core.js:16126)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
    at push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask (zone.js:498)
    at ZoneTask.invoke (zone.js:487)
    at timer (zone.js:2281)

Note that this happens before any requests are made to server to retrieve data.
Angular component :
export class MyComponent implements OnInit {
public data: DataManager;

  ngOnInit(): void {
    this.data = new DataManager({
      url: "api/orders",
      adaptor: new WebApiAdaptor(),
      offline: true

  actionFailure(e: any): void {

Angular component HTML:
<ejs-grid [dataSource]="data" (actionFailure)='actionFailure($event)'>
    <e-column field="id" headerText="Order ID" textAlign="Right" width="120"></e-column>
    <e-column field='CustomerID' headerText='Customer ID' width=150></e-column>
    <e-column field='ShipCity' headerText='Ship City' width=150></e-column>
    <e-column field='ShipName' headerText='Ship Name' width=150></e-column>

Can you help me with this please?

Thavasianand Sankaranarayanan [Syncfusion]
Replied On March 18, 2019 08:39 AM UTC

Hi Rami, 

Greetings from Syncfusion. 

Query: I'm getting the following error using grid and asp.net core web api 
ERROR TypeError: Cannot read property 'indexOf' of undefined 

We have analyzed your query but we are unable to reproduce the reported issue at our end. Please provide the below mentioned details, it will be helpful for us to provide a better solution asap. 

  1. Grid package version details?
  2. Full grid code example(including server side code)?
  3. Please try to reproduce the reproduce the reported issue in below attached sample if possible?

Thavasianand S. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon