Issue while adding POST/GET with pay load using CreateDataProcessor

Hi Team,
We are facing an issue in using CreateDataProcessor for Gantt version 6.1.3.

NB: We already having license for GANTT chart.

Our Requirement is to sent a request payload in Data Processor.

For that we tried
• Using CreateDataProcessor - Showed error during run time ( Type Error : Gantt.CreateDataProcessor is not a function).
• Using dp.setTransactionMode({
mode: “POST”,
payload: { jsonObj }
},true) => This is not sending request with payload and the request type is of POST is getting converted to GET always

Could you please so help us with this , since our requirement is to do Server side filtering using Lazyloading

Regards
prabhash

Hi @prabhash !

I’ve tried to reproduce your problems.
In the first case, I think you use incorrect syntax to create a new dataProcessor instance.
Correct syntax:
gantt.createDataProcessor
Here is an article to get more information about it:
https://docs.dhtmlx.com/gantt/api__gantt_createdataprocessor.html

Here is a gif with the issue and fixing it:
http://recordit.co/1v14hupSmX

In the second case, probably you’re talking about the request sent when you call gantt.load, it works separately from the dataProcessor and always work in GET mode.

If you want to request data using POST request, you can send the ajax request manually:

gantt.ajax.post({
   url:"/api",
   data:{param1: "value", param2:"value2"},
   callback:function(request){
      gantt.parse(request.responseText)
   }
});

Here are the related docs:
https://docs.dhtmlx.com/gantt/desktop__server_side.html#customrequestheadersandparameters
https://docs.dhtmlx.com/gantt/api__gantt_ajax_other.html