Infinite Loop

The controller gaves correct response when called manually :

{"items":[{"ticketAgentGroupId":1,"name":"OP DATA","createAt":"2020-08-18T15:20:58.318","createBy":"Toto"},{"ticketAgentGroupId":2,"name":"COPIEUR","createAt":"2020-08-19T12:08:10.2760329","createBy":"Toto"},{"ticketAgentGroupId":3,"name":"GED","createAt":"2020-08-19T12:08:55.0425033","createBy":"Toto"},{"ticketAgentGroupId":11,"name":"NOUVEAU GROUPE","createAt":"2020-08-19T16:16:56.6038797"}],"count":4}


But when hitting the view, the data grid is showing :
- "No records to display"
- "1 of 1 page (4 items)"

Blue loading circle is continuously turning...

<ejs-grid id="Grid" allowPaging="true">
    <e-data-manager url="https://localhost:44350/api/TicketAgentGroup" crossdomain="true" adaptor="WebApiAdaptor"></e-data-manager>
    <e-grid-columns>
        <e-grid-column field="ticketAgentGroupId" headerText="ID" type="number" textAlign="Right" width="25" isIdentity="true" allowEditing="false"></e-grid-column>
        <e-grid-column field="name" headerText="TicketAgentGroup Name" type="string" width="150"></e-grid-column>
        <e-grid-column field="createAt" headerText="Created Date" format='yMd' width="60" allowEditing="false"></e-grid-column>
        <e-grid-column field="createBy" headerText="Created By" type="string" width="75" allowEditing="false"></e-grid-column>
    </e-grid-columns>
</ejs-grid>

Could you please tell me if there is bug or what the problem is ?

Best regards,
Romain

Attachment: AlienErp_bbb1ee1f.zip

1 Reply 1 reply marked as answer

PG Praveenkumar Gajendiran Syncfusion Team August 20, 2020 01:03 PM UTC

Hi Romain, 

Thanks for contacting Syncfusion support. 

Based an your query you have an issue with data binding in Grid by WebApi Adaptor. In your provided details, we have found that you have returning the response object properties as items and count  as incorrect.

We would like to inform you that while using WebApi Adaptor, response object properties should be as Items and Count

So, we suggested to update the code as  Items and Count (in your server dataSource method return ) to resolve your problem. 
Refer the below document link for WebApi Adaptor,

Documentation Link: https://ej2.syncfusion.com/aspnetcore/documentation/grid/data-binding/#web-api 
Please let us know, if you have any concerns. 

Regards, 
Praveenkumar G 


Marked as answer
Loader.
Up arrow icon