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

How to render EJ2 Gantt using PHP and update DB on CRUD operations using PHP

Hello,

I know about this great article https://www.syncfusion.com/kb/11004/how-to-render-ej2-gantt-using-php-and-update-db-on-crud-operations  Could you give us examples of other Actions and where we can find more info. For example, example code for Outdent, indent, predecessor, drag&drop for Gantt with PHP and MySQL?


1 Reply

MS Monisha Sivanthilingam Syncfusion Team December 13, 2022 09:40 AM UTC

Hi Davor,


Greetings from Syncfusion support.


We can use the actionComplete event to update to the database using the various request types triggered for each action. The below requestTypes are triggered for each action.


Sl.No.

 

Action

Request Type / Action

1

 

Row Drag and Drop

requestType : rowDropped

2

 

Indent

requestType : indented

3

 

Outdent

requestType : outdented

4

 

Draw Connector Line

action : DrawConnectorLine


Index.js

 

actionComplete: function(args) {

  if (args.action == "DialogEditing" ||

      args.action == "CellEditing" ||

      args.requestType == "rowDropped" ||

      args.requestType == "indented" ||

      args.requestType == "outdented" ||

      args.action == "DrawConnectorLine") {

        var data = JSON.stringify(args.data.taskData);

        console.log(data);

  }

}

 


Sample: https://stackblitz.com/edit/xpdoe9?file=index.js


KB: https://www.syncfusion.com/kb/11004/how-to-render-ej2-gantt-using-php-and-update-db-on-crud-operations


Regards,

Monisha.


Loader.
Live Chat Icon For mobile
Up arrow icon