Update task id value

22 Mar 2018 / 1 minute to read

Id value of Gantt tasks can be changed dynamically by using updateTaskId method. The below code example shows how to invoke this method on button click action.

  • cshtml
  • @(Html.EJ().Gantt("gantt")
        //..      
    	)
    @(Html.EJ().ScriptManager())
    
    $("#update_task_id").click(function () {
    	var ganttObj = $("#gantt").ejGantt("instance");
    	ganttObj.updateTaskId(5, 7);
    });

    The below screen shows the output of above code example.

    Update-Task-Id_img1

    Before id update

    Update-Task-Id_img2

    After id update