Grid doesn't display data

Hi, attached is the test html and js files. The grid would not display the data with the JSON. API returns the JSON format which is in the variable ptwGridJSON variable but it always fails with 

Uncaught DataManager: Invalid arguments

Error: DataManager: Invalid arguments


What format should the URL res


Attachment: test_f5f31ce.zip

3 Replies

AR Aishwarya Rameshbabu Syncfusion Team November 8, 2024 06:29 PM UTC

Hi Naveen Davuluri,


Greetings from Syncfusion support.


The error you're encountering, "Uncaught DataManager: Invalid arguments," suggests that the data source provided to the Syncfusion Grid might not be correctly parsed or formatted.


We are converting ptwGridDataJSON using JSON.parse() is the correct approach if the data is initially in string format. Syncfusion Grids require the dataSource to be an array of objects, so parsing the JSON string into an appropriate JavaScript object format is necessary. If your data appears in the grid as expected after this change, you are on the right track. It is essential to ensure your API responses and any static JSON data are properly parsed when used with front-end components like Syncfusion's Grid.


Screenshot:



Sample: Please find in the attachment.


If you need any other assistance or have additional questions, please feel free to contact us.


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 


Regards

Aishwarya R


Attachment: UpdatedSample_49de393c.zip


ND Naveen Davuluri November 8, 2024 07:38 PM UTC

Thanks. That fixed the problem. Appreciate the help



SR Sivaranjani Rajasekaran Syncfusion Team November 11, 2024 06:50 AM UTC


You are most welcome. Please get back to us if you need any other assistance.


Regards,

Sivaranjani R

Loader.
Up arrow icon