Premium support for our pure JavaScript UI components


Post by vbureanu »

Hello guys,

We are trying to load JSON to Gantt project:

1.png
1.png (84.02 KiB) Viewed 193 times

From server we receive the data in this format:

2.png
2.png (112.26 KiB) Viewed 193 times

Naturally, Gantt does not read this data as is formatted.
Is it possible to indicate the data "format" to load data using format as on picture?

PS: additional question, (related to the GET request) how we can remove that "data" line from request payload?

3.png
3.png (126.19 KiB) Viewed 193 times

Thanks,
Vitalie


Post by marcio »

Hey Vitalie,

You could try to load the data externally, format it in the proper way then set it as the Gantt data.

https://www.bryntum.com/docs/scheduler-pro/api/Scheduler/crud/transport/AjaxTransport#function-sendRequest

Also, regarding the GET request, you'll see in the transport config documentation that for GET the paramName has the following description

Name of the parameter that will contain a serialized load request. The value is mandatory for requests using GET method (default for load) so if the value is not provided data string is used as default. This value is optional for HTTP methods like POST and PUT, the request body will be used for data transferring in these cases.

https://www.bryntum.com/docs/scheduler-pro/api/Scheduler/crud/transport/AjaxTransport#config-transport

Best regards,
Márcio


Post Reply