How to get state after changes ( ex: leftResizing, RightResizing, ChildDrag, Progress ) specialy when i use a REST API !!

Hello Syncfusion Team,

I'm using ej2-react-gantt with reactjs and redux , and im using REST Api's for actions ( CRUD), i want to handle state when i update it : for example when i do 
LeftResizing, RightResizing, ProgressResizing, ChildDrag, i want to get the new state (new dates, progress, ...) of the row to dispatch it into my update action .

i have a try with the taskBarEditing props of gantt but it shows me an error : 
TypeError: Cannot read property 'rowUniqueID' of undefined

evry time i want to update it doesn't work and the gantt doesn't re-render again and get the new data !

is there any solution please ??

this is my code :

//.....//
this.editSettings = {
      allowAdding: true,
      allowEditing: true,
      allowDeleting: true,
      allowTaskbarEditing: true,
      showDeleteConfirmDialog: true,
      allowDragging: true,
      mode: "Dialog",
    };
//.....//

taskbarEditing = (args=> {
    if(args?.taskBarEditAction == "ParentDrag") {
      args.cancel = true;
    }
    if (
      args.taskBarEditAction == "LeftResizing" ||
      args.taskBarEditAction == "RightResizing" ||
      args.taskBarEditAction == "ProgressResizing" ||
      args.taskBarEditAction == "ChildDrag"
    ) {
        this.props.edit(
          args?.editingFields?.taskId, 
          args?.editingFields?.startDate,
          args?.editingFields?.endDate,
          args?.editingFields?.progress,
        );
      }
  };
//.....//

<GanttComponent
            id="Editing"
            dataSource={data}
            dateFormat={"MMM dd, y"}
            treeColumnIndex={1}
            allowSelection={true}
            showColumnMenu={false}
            highlightWeekends={true}
            allowUnscheduledTasks={true}
            projectStartDate={this.projectStartDate}
            projectEndDate={this.projectEndDate}
            taskFields={this.taskFields}
            timelineSettings={this.timelineSettings}
            labelSettings={this.labelSettings}
            splitterSettings={this.splitterSettings}
            height="410px"
            editSettings={this.editSettings}
            gridLines={this.gridLines}
            toolbar={this.toolbar}
            queryTaskbarInfo={this.queryTaskbarInfo.bind(this)}
            toolbarClick={this.toolbarClick.bind(this)}
            actionBegin={this.actionBegin}
            // actionComplete={this.actionComplete}
            taskbarEditing={this.taskbarEditing}
            allowSorting={true}
            allowFiltering={true}
          ><Inject
              services={[EditSelectionToolbarDayMarkersSortFilter]}
            /></GanttComponent>

5 Replies 1 reply marked as answer

KR Karthikeyan Raja Syncfusion Team January 28, 2021 11:35 AM UTC

Hi Naim, 
 
We have analyzed your query. All the modified data in Gantt control can be maintained in the database using RESTful web services. We can also do CRUD operations over Gantt data and save the changes to database. By using BatchUrl property of DataManager, we can communicate with the controller method to update the data source on CRUD operation.  
Please refer the below documentation link for further reference. 
 
Also we are unable to reproduce the reported issue “Cannot read property ‘rowUniqueID’ of undefined.” This may due to, Changing datasource while taskbar edited.  
If you are still facing  problem, Please share more details  
  1. In which use case you were facing this issue?
  2. Gantt version and configuration details
  3. Issue reproduceable sample
  4. Video reference of the issue
 
Please let us know, If you have any concerns. 
 
Regards, 
Karthikeyan Raja 


Marked as answer

NB Naim Blg February 1, 2021 10:10 AM UTC

Hi Karthikeyan Raja,

thanks it works , it was a problem of config in my gantt ,

thanks alot for your response.

Best regards,


MS Monisha Sivanthilingam Syncfusion Team February 2, 2021 09:10 AM UTC

Hi Naim,  
 
You are welcome. 
 
Please contact us if you require any further assistance. 
 
Regards, 
Monisha. 



NB Naim Blg February 2, 2021 10:23 AM UTC

Thank you for your assistance


KR Karthikeyan Raja Syncfusion Team February 3, 2021 12:11 PM UTC

Hi Naim,

Please get back to us, if you need any further assistance.
 
 
Regards, 
Karthikeyan Raja 


Loader.
Up arrow icon